Detach virtual private gateway support
This commit is contained in:
parent
166fd69515
commit
db7757347a
3 changed files with 51 additions and 2 deletions
|
|
@ -2494,6 +2494,14 @@ class VpnGatewayBackend(object):
|
|||
raise InvalidVpnGatewayIdError(vpn_gateway_id)
|
||||
return deleted
|
||||
|
||||
def detach_vpn_gateway(self, vpn_gateway_id, vpc_id):
|
||||
vpn_gateway = self.get_vpn_gateway(vpn_gateway_id)
|
||||
self.get_vpc(vpc_id)
|
||||
detached = vpn_gateway.attachments.pop(vpc_id, None)
|
||||
if not detached:
|
||||
raise InvalidVPCIdError(vpc_id)
|
||||
return detached
|
||||
|
||||
|
||||
class EC2Backend(BaseBackend, InstanceBackend, TagBackend, AmiBackend,
|
||||
RegionsAndZonesBackend, SecurityGroupBackend, EBSBackend,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue