mirror of
https://github.com/fog/fog-aws.git
synced 2022-11-09 13:50:52 -05:00
create db instance in the correct region
* and fix variable shadow warning
This commit is contained in:
parent
4baad70757
commit
88986d37c6
1 changed files with 2 additions and 3 deletions
|
@ -33,8 +33,8 @@ module Fog
|
||||||
response = Excon::Response.new
|
response = Excon::Response.new
|
||||||
server_set = []
|
server_set = []
|
||||||
if identifier
|
if identifier
|
||||||
if server = self.data[:servers][identifier]
|
if specified_server = self.data[:servers][identifier]
|
||||||
server_set << server
|
server_set << specified_server
|
||||||
else
|
else
|
||||||
raise Fog::AWS::RDS::NotFound.new("DBInstance #{identifier} not found")
|
raise Fog::AWS::RDS::NotFound.new("DBInstance #{identifier} not found")
|
||||||
end
|
end
|
||||||
|
@ -46,7 +46,6 @@ module Fog
|
||||||
case server["DBInstanceStatus"]
|
case server["DBInstanceStatus"]
|
||||||
when "creating"
|
when "creating"
|
||||||
if Time.now - server['InstanceCreateTime'] >= Fog::Mock.delay * 2
|
if Time.now - server['InstanceCreateTime'] >= Fog::Mock.delay * 2
|
||||||
region = "us-east-1"
|
|
||||||
server["DBInstanceStatus"] = "available"
|
server["DBInstanceStatus"] = "available"
|
||||||
server["AvailabilityZone"] ||= region + 'a'
|
server["AvailabilityZone"] ||= region + 'a'
|
||||||
server["Endpoint"] = {"Port"=>3306,
|
server["Endpoint"] = {"Port"=>3306,
|
||||||
|
|
Loading…
Reference in a new issue