1
0
Fork 0
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:
Josh Lane 2015-03-26 15:15:08 -07:00
parent 4baad70757
commit 88986d37c6

View file

@ -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,