Detach virtual private gateway support
This commit is contained in:
parent
166fd69515
commit
db7757347a
3 changed files with 51 additions and 2 deletions
|
|
@ -74,3 +74,31 @@ def test_vpn_gateway_tagging():
|
|||
vpn_gateway = conn.get_all_vpn_gateways()[0]
|
||||
vpn_gateway.tags.should.have.length_of(1)
|
||||
vpn_gateway.tags["a key"].should.equal("some value")
|
||||
|
||||
|
||||
@mock_ec2
|
||||
def test_detach_vpn_gateway():
|
||||
|
||||
conn = boto.connect_vpc('the_key', 'the_secret')
|
||||
vpc = conn.create_vpc("10.0.0.0/16")
|
||||
vpn_gateway = conn.create_vpn_gateway('ipsec.1', 'us-east-1a')
|
||||
|
||||
conn.attach_vpn_gateway(
|
||||
vpn_gateway_id=vpn_gateway.id,
|
||||
vpc_id=vpc.id
|
||||
)
|
||||
|
||||
gateway = conn.get_all_vpn_gateways()[0]
|
||||
attachments = gateway.attachments
|
||||
attachments.should.have.length_of(1)
|
||||
attachments[0].vpc_id.should.equal(vpc.id)
|
||||
attachments[0].state.should.equal('attached')
|
||||
|
||||
conn.detach_vpn_gateway(
|
||||
vpn_gateway_id=vpn_gateway.id,
|
||||
vpc_id=vpc.id
|
||||
)
|
||||
|
||||
gateway = conn.get_all_vpn_gateways()[0]
|
||||
attachments = gateway.attachments
|
||||
attachments.should.have.length_of(0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue