diff --git a/lib/fog/aws/requests/rds/create_db_subnet_group.rb b/lib/fog/aws/requests/rds/create_db_subnet_group.rb index 0c4d37c1f..46c189cc5 100644 --- a/lib/fog/aws/requests/rds/create_db_subnet_group.rb +++ b/lib/fog/aws/requests/rds/create_db_subnet_group.rb @@ -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,