Autoscaling instance azs (#2030)
* Add instance AZ support in autoscaling * Resolve py36-py27 format string error in test_autoscaling
This commit is contained in:
parent
fb2a76fd66
commit
868d0107bf
10 changed files with 157 additions and 111 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import boto
|
||||
import boto3
|
||||
from boto import vpc as boto_vpc
|
||||
from moto import mock_ec2, mock_ec2_deprecated
|
||||
|
||||
|
||||
|
|
@ -19,9 +20,14 @@ def setup_networking():
|
|||
|
||||
@mock_ec2_deprecated
|
||||
def setup_networking_deprecated():
|
||||
conn = boto.connect_vpc()
|
||||
conn = boto_vpc.connect_to_region('us-east-1')
|
||||
vpc = conn.create_vpc("10.11.0.0/16")
|
||||
subnet1 = conn.create_subnet(vpc.id, "10.11.1.0/24")
|
||||
subnet2 = conn.create_subnet(vpc.id, "10.11.2.0/24")
|
||||
subnet1 = conn.create_subnet(
|
||||
vpc.id,
|
||||
"10.11.1.0/24",
|
||||
availability_zone='us-east-1a')
|
||||
subnet2 = conn.create_subnet(
|
||||
vpc.id,
|
||||
"10.11.2.0/24",
|
||||
availability_zone='us-east-1b')
|
||||
return {'vpc': vpc.id, 'subnet1': subnet1.id, 'subnet2': subnet2.id}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue