Help getting access to server config ( proxy url )


#1

I’m looking at Cloudforms Essentials “ec2_synchronize_tags” and it makes it’s own “raw” ec2 connection.

This is problematic. For example it doesn’t take advantage of the “system” proxy config.

I made an ugly update to mine:

def get_aws_client(type='EC2')
  require 'aws-sdk'
  myhandler = AWS::Core::Http::NetHttpHandler.new(:proxy_uri => "http://10.120.97.207:3128" ) # added tihs , HARD CODED : BAD!!!
  AWS.config(
    :access_key_id => @provider.authentication_userid,
    :secret_access_key => @provider.authentication_password,
    :region => @provider.provider_region,
    :http_handler => myhandler  # added it here
  )
  return Object::const_get("AWS").const_get("#{type}").new()
end

So this code is functional, it works. But i’d like to access “VMDB::Util.http_proxy_uri” ( from the global server config)

Is there a way to do that?

Thanks,
David


Get web proxy info in automation states
#2

@ramrexx can you review this question from @dthornton. Feel free to forward if necessary.


#3

John,
I just happen to be looking at this. I think he is asking if how to access the http_proxy settings from the advanced settings yml via automate? Maybe @mkanoor has an idea?


#4

thanks @ramrexx I also opened an issue over in git hub. Sorry for the spam. I’m also grepping “provider” in the code to see if there is a way using the provider to do this. it crosses me as the sort of thing where every provider has this feature. Each one might implemented it differently, but the CF provider object might be able to present a consistent interface ( for working with tags). Makes me think of linux’s vfs.

David