Add support for default VPCs and subnets.
The first VPC created will be elected as default. All subnets of the default VPC are considered default for their availability zone.
This commit is contained in:
parent
be3291b758
commit
284641e8cf
4 changed files with 17 additions and 5 deletions
|
|
@ -115,6 +115,11 @@ def test_get_subnets_filtering():
|
|||
subnets_by_az.should.have.length_of(1)
|
||||
set([subnet.id for subnet in subnets_by_az]).should.equal(set([subnetB1.id]))
|
||||
|
||||
# Filter by defaultForAz
|
||||
subnets_by_az = conn.get_all_subnets(filters={'defaultForAz': "true"})
|
||||
subnets_by_az.should.have.length_of(1)
|
||||
set([subnet.id for subnet in subnets_by_az]).should.equal(set([subnetA.id]))
|
||||
|
||||
# Unsupported filter
|
||||
conn.get_all_subnets.when.called_with(filters={'not-implemented-filter': 'foobar'}).should.throw(NotImplementedError)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue