From 9cf9e1a877c4657731d8a60da03a2bf31b81fbf3 Mon Sep 17 00:00:00 2001 From: Josh Lane Date: Thu, 13 Aug 2015 08:58:47 -0700 Subject: [PATCH] expose elb region --- lib/fog/aws/elb.rb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/fog/aws/elb.rb b/lib/fog/aws/elb.rb index 4399569a6..5c0c588ee 100644 --- a/lib/fog/aws/elb.rb +++ b/lib/fog/aws/elb.rb @@ -80,6 +80,8 @@ module Fog @data = nil end + attr_reader :region + def initialize(options={}) @use_iam_profile = options[:use_iam_profile] @@ -144,9 +146,10 @@ module Fog @connection = Fog::XML::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options) setup_credentials(options) - end + attr_reader :region + def reload @connection.reset end @@ -154,12 +157,12 @@ module Fog 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)