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

Merge pull request #2704 from sugarb/vpc_create_mock_fix

[AWS/vpc] Fix VPC creation mock
This commit is contained in:
Wesley Beary 2014-03-03 09:41:59 -06:00
commit 41072e9f7d

View file

@ -44,14 +44,14 @@ module Fog
if cidrBlock
response.status = 200
vpc_id = Fog::AWS::Mock.vpc_id
self.data[:vpcs].push({
vpc = {
'vpcId' => vpc_id,
'state' => 'pending',
'cidrBlock' => cidrBlock,
'dhcpOptionsId' => Fog::AWS::Mock.request_id,
'tagSet' => {}
})
}
self.data[:vpcs].push(vpc)
#Creates a default route for the subnet
default_route = self.route_tables.new(:vpc_id => vpc_id)
@ -74,7 +74,7 @@ module Fog
response.body = {
'requestId' => Fog::AWS::Mock.request_id,
'vpcSet' => self.data[:vpcs]
'vpcSet' => [vpc]
}
else
response.status = 400