mirror of
https://github.com/fog/fog-aws.git
synced 2022-11-09 13:50:52 -05:00
fix create_db_subnet_group mock
This commit is contained in:
parent
d76a03e783
commit
06021e9350
1 changed files with 3 additions and 4 deletions
|
@ -31,15 +31,14 @@ module Fog
|
|||
end
|
||||
|
||||
# collection = Fog::Compute::AWS.new(:aws_access_key_id => 'mock key', :aws_secret_access_key => 'mock secret')
|
||||
collection = Fog::Compute[:aws]
|
||||
collection.region = @region
|
||||
compute_data = Fog::Compute::AWS::Mock.data[self.region][self.aws_access_key_id]
|
||||
|
||||
subnets = subnet_ids.map do |snid|
|
||||
subnet = collection.subnets.get(snid)
|
||||
subnet = compute_data[:subnets].detect { |s| s['subnetId'] == snid }
|
||||
raise Fog::AWS::RDS::NotFound.new("InvalidSubnet => The subnet '#{snid}' was not found") if subnet.nil?
|
||||
subnet
|
||||
end
|
||||
vpc_id = subnets.first.vpc_id
|
||||
vpc_id = subnets.first['vpcId']
|
||||
|
||||
data = {
|
||||
'DBSubnetGroupName' => name,
|
||||
|
|
Loading…
Reference in a new issue