Lints.
This commit is contained in:
parent
1433f28846
commit
f37bad0e00
260 changed files with 6363 additions and 3766 deletions
|
|
@ -5,13 +5,15 @@ from moto.ec2.utils import filters_from_querystring
|
|||
|
||||
|
||||
class Subnets(BaseResponse):
|
||||
|
||||
def create_subnet(self):
|
||||
vpc_id = self.querystring.get('VpcId')[0]
|
||||
cidr_block = self.querystring.get('CidrBlock')[0]
|
||||
if 'AvailabilityZone' in self.querystring:
|
||||
availability_zone = self.querystring['AvailabilityZone'][0]
|
||||
else:
|
||||
zone = random.choice(self.ec2_backend.describe_availability_zones())
|
||||
zone = random.choice(
|
||||
self.ec2_backend.describe_availability_zones())
|
||||
availability_zone = zone.name
|
||||
subnet = self.ec2_backend.create_subnet(
|
||||
vpc_id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue