1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[aws|rds] Mock support for setting AZ and MultiAZ

Mocking preserves the AvailabilityZone and MultiAZ parameters if set.
This commit is contained in:
Aaron Suggs 2012-08-15 11:50:56 -04:00
parent cb1357252a
commit 3992e818b7
2 changed files with 2 additions and 2 deletions

View file

@ -85,7 +85,7 @@ module Fog
"Engine"=> options["Engine"],
"EngineVersion"=> options["EngineVersion"] || "5.5.12",
"PendingModifiedValues"=>{"MasterUserPassword"=>"****"}, # This clears when is available
"MultiAZ"=>false,
"MultiAZ"=> !!options['MultiAZ'],
"MasterUsername"=> options["MasterUsername"],
"DBInstanceClass"=> options["DBInstanceClass"],
"DBInstanceStatus"=>"creating",

View file

@ -51,7 +51,7 @@ module Fog
if Time.now - server['InstanceCreateTime'] >= Fog::Mock.delay * 2
region = "us-east-1"
server["DBInstanceStatus"] = "available"
server["AvailabilityZone"] = region + 'a'
server["AvailabilityZone"] ||= region + 'a'
server["Endpoint"] = {"Port"=>3306,
"Address"=> Fog::AWS::Mock.rds_address(server["DBInstanceIdentifier"],region) }
server["PendingModifiedValues"] = {}