Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add proxy support #7

Merged
merged 4 commits into from
Apr 20, 2017
Merged

Add proxy support #7

merged 4 commits into from
Apr 20, 2017

Conversation

jjasghar
Copy link

@jjasghar jjasghar commented Apr 18, 2017

This add proxy support, with ENV https_proxy, to access Vsphere API

rbvmomi support proxy ( but no proxy pass and user for now ).

@@ -8,6 +9,12 @@ class VsphereHelper
end

def initialize(connect_options, datacenter_name)
if ENV['https_proxy']
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mwrock on Dec 1, 2016 Contributor
I'd do the same with HTTP_PROXY and make https_proxy uppercase which should not matter on windows but will on linux.

Added changes for https and http proxy

Signed-off-by: JJ Asghar <[email protected]>
Copy link

@nealbrown nealbrown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

proxy_uri = URI.parse(ENV['HTTP_PROXY'])
connect_options[:proxyHost] = proxy_uri.host
connect_options[:proxyPort] = proxy_uri.port
when ENV['HTTPS_PROXY_']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there may be an extra underscore here (...OXY_']...)

JJ Asghar added 2 commits April 20, 2017 16:13
proxy parsing can be challanging.

Signed-off-by: JJ Asghar <[email protected]>
@jjasghar jjasghar merged commit bcfed08 into master Apr 20, 2017
@jjasghar jjasghar deleted the rlanore-master branch April 20, 2017 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants