From 88986d37c6aefa98e31d954fa437c6ee7c2ff7c5 Mon Sep 17 00:00:00 2001 From: Josh Lane Date: Thu, 26 Mar 2015 15:15:08 -0700 Subject: [PATCH] create db instance in the correct region * and fix variable shadow warning --- lib/fog/aws/requests/rds/describe_db_instances.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/fog/aws/requests/rds/describe_db_instances.rb b/lib/fog/aws/requests/rds/describe_db_instances.rb index 25a162f9b..2bc663e5d 100644 --- a/lib/fog/aws/requests/rds/describe_db_instances.rb +++ b/lib/fog/aws/requests/rds/describe_db_instances.rb @@ -33,8 +33,8 @@ module Fog response = Excon::Response.new server_set = [] if identifier - if server = self.data[:servers][identifier] - server_set << server + if specified_server = self.data[:servers][identifier] + server_set << specified_server else raise Fog::AWS::RDS::NotFound.new("DBInstance #{identifier} not found") end @@ -46,7 +46,6 @@ module Fog case server["DBInstanceStatus"] when "creating" if Time.now - server['InstanceCreateTime'] >= Fog::Mock.delay * 2 - region = "us-east-1" server["DBInstanceStatus"] = "available" server["AvailabilityZone"] ||= region + 'a' server["Endpoint"] = {"Port"=>3306,