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

Do the same thing for vpcs as previously done for subnets

This commit is contained in:
Bohuslav Kabrda 2012-07-02 14:30:31 +02:00
parent d93de63a58
commit f61143703d
4 changed files with 13 additions and 17 deletions

View file

@ -199,7 +199,8 @@ module Fog
:tag_sets => Hash.new do |tag_set_hash, resource_id|
tag_set_hash[resource_id] = {}
end,
:subnets => []
:subnets => [],
:vpcs => []
}
end
end

View file

@ -43,16 +43,17 @@ module Fog
Excon::Response.new.tap do |response|
if cidrBlock
response.status = 200
self.data[:vpcs].push({
'vpcId' => Fog::AWS::Mock.request_id,
'state' => 'pending',
'cidrBlock' => cidrBlock,
'dhcpOptionsId' => Fog::AWS::Mock.request_id,
'tagSet' => {}
})
response.body = {
'requestId' => Fog::AWS::Mock.request_id,
'vpcSet' => [
'vpcId' => Fog::AWS::Mock.request_id,
'state' => 'pending',
'cidrBlock' => cidrBlock,
'dhcpOptionsId' => Fog::AWS::Mock.request_id,
'tagSet' => {}
]
'vpcSet' => self.data[:vpcs]
}
else
response.status = 400

View file

@ -34,6 +34,7 @@ module Fog
Excon::Response.new.tap do |response|
if vpc_id
response.status = 200
self.data[:vpcs].reject! { |v| v['vpcId'] == vpc_id }
response.body = {
'requestId' => Fog::AWS::Mock.request_id,

View file

@ -45,14 +45,7 @@ module Fog
response.status = 200
response.body = {
'requestId' => Fog::AWS::Mock.request_id,
'vpcSet' => [
'vpcId' => Fog::AWS::Mock.request_id,
'state' => 'pending',
'cidrBlock' => '10.255.255.0/24',
'dhcpOptionsId' => Fog::AWS::Mock.request_id,
'instanceTenancy' => 'default',
'tagSet' => {}
]
'vpcSet' => self.data[:vpcs]
}
end
end