candlepin/subscription-manager — pull request #826 by jmrodri (2013-11-22 20:38:01+00:00)
Title: respect http(s)_proxy env variable for proxy information

The idea behind this is to allow a user to specify the username/password
and other proxy information in an environment variable instead of
the configuration file. Subscription manager will use the values passed in from
the cli or from the configuration file if present otherwise it will try to use
the http(s)_proxy environment variables. The variables are read in the following
order:

HTTPS_PROXY
https_proxy
HTTP_PROXY
http_proxy

Summary of changes:

* updated parse_url to handle username/password
* Add unit tests for parse_util
* added get_env_proxy_info utility method to hide details of
working with the env variables.
* cp_provider, managergui, managercli, repolib use the new
utility method.
* rhsm_login and migrate were untouched.

TEST
--------
* setup a squid proxy in a guest to use as a proxy for this test
* on your subscription manager machine do the following:
* export HTTPS_PROXY=https://username:password@proxyhost:port
* subscription-manager register

Consumer should be registered.

You can also configure squid to deny all requests and watch subscription-manager fail to register.