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:
Marco Rucci 2015-12-06 20:58:54 +01:00
commit 284641e8cf
4 changed files with 17 additions and 5 deletions

View file

@ -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)