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

And the same for internet gateways

This commit is contained in:
Bohuslav Kabrda 2012-07-02 14:43:21 +02:00
parent 25e51234ec
commit 36ad5bcea4
4 changed files with 11 additions and 15 deletions

View file

@ -201,7 +201,8 @@ module Fog
end,
:subnets => [],
:vpcs => [],
:dhcp_options => []
:dhcp_options => [],
:internet_gateways => []
}
end
end

View file

@ -33,15 +33,16 @@ module Fog
class Mock
def create_internet_gateway()
Excon::Response.new(
self.data[:internet_gateways].push({
'internetGatewayId' => Fog::AWS::Mock.request_id,
'attachmentSet' => {},
'tagSet' => {}
})
Excon::Response.new(
:status => 200,
:body => {
'requestId' => Fog::AWS::Mock.request_id,
'internetGatewaySet' => [
'internetGatewayId' => Fog::AWS::Mock.request_id,
'attachmentSet' => {},
'tagSet' => {}
]
'internetGatewaySet' => self.data[:internet_gateways]
}
)
end

View file

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

View file

@ -44,14 +44,7 @@ module Fog
response.status = 200
response.body = {
'requestId' => Fog::AWS::Mock.request_id,
'internetGatewaySet' => [
'internetGatewayId' => Fog::AWS::Mock.request_id,
'attachmentSet' => {
'vpcId' => Fog::AWS::Mock.request_id,
'state' => 'pending',
},
'tagSet' => {}
]
'internetGatewaySet' => self.data[:internet_gateways]
}
end
end