Skip to content

Commit

Permalink
expose elb region
Browse files Browse the repository at this point in the history
  • Loading branch information
lanej committed Aug 13, 2015
1 parent fdf71a9 commit 9cf9e1a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/fog/aws/elb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def self.reset
@data = nil
end

attr_reader :region

def initialize(options={})
@use_iam_profile = options[:use_iam_profile]

Expand Down Expand Up @@ -144,22 +146,23 @@ def initialize(options={})
@connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options)

setup_credentials(options)

end

attr_reader :region

def reload
@connection.reset
end

private

def setup_credentials(options={})
@aws_access_key_id = options[:aws_access_key_id]
@aws_secret_access_key = options[:aws_secret_access_key]
@aws_session_token = options[:aws_session_token]
@aws_access_key_id = options[:aws_access_key_id]
@aws_secret_access_key = options[:aws_secret_access_key]
@aws_session_token = options[:aws_session_token]
@aws_credentials_expire_at = options[:aws_credentials_expire_at]

@signer = Fog::AWS::SignatureV4.new( @aws_access_key_id, @aws_secret_access_key,@region,'elasticloadbalancing')
@signer = Fog::AWS::SignatureV4.new(@aws_access_key_id, @aws_secret_access_key, @region, 'elasticloadbalancing')
end

def request(params)
Expand Down

0 comments on commit 9cf9e1a

Please sign in to comment.