Fix styling problems
This commit is contained in:
parent
2b19416ab0
commit
3398244f14
3 changed files with 53 additions and 51 deletions
|
|
@ -2433,9 +2433,9 @@ class VPC(TaggedEC2Resource):
|
|||
self.dhcp_options = None
|
||||
self.state = "available"
|
||||
self.instance_tenancy = instance_tenancy
|
||||
self.is_default = 'true' if is_default else 'false'
|
||||
self.enable_dns_support = 'true'
|
||||
self.classic_link_enabled = 'false'
|
||||
self.is_default = "true" if is_default else "false"
|
||||
self.enable_dns_support = "true"
|
||||
self.classic_link_enabled = "false"
|
||||
# This attribute is set to 'true' only for default VPCs
|
||||
# or VPCs created using the wizard of the VPC console
|
||||
self.enable_dns_hostnames = "true" if is_default else "false"
|
||||
|
|
@ -2537,8 +2537,8 @@ class VPC(TaggedEC2Resource):
|
|||
# Doesn't check any route tables, maybe something for in the future?
|
||||
# See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html#classiclink-limitations
|
||||
network_address = ipaddress.ip_network(self.cidr_block).network_address
|
||||
if network_address not in ipaddress.ip_network('10.0.0.0/8') or network_address in ipaddress.ip_network(
|
||||
'10.0.0.0/16') or network_address in ipaddress.ip_network('10.1.0.0/16'):
|
||||
if network_address not in ipaddress.ip_network("10.0.0.0/8") or network_address in ipaddress.ip_network(
|
||||
"10.0.0.0/16") or network_address in ipaddress.ip_network("10.1.0.0/16"):
|
||||
self.classic_link_enabled = "true"
|
||||
|
||||
return self.classic_link_enabled
|
||||
|
|
@ -2548,11 +2548,11 @@ class VPC(TaggedEC2Resource):
|
|||
return self.classic_link_enabled
|
||||
|
||||
def enable_vpc_classic_link_dns_support(self):
|
||||
self.classic_link_dns_supported = 'true'
|
||||
self.classic_link_dns_supported = "true"
|
||||
return self.classic_link_dns_supported
|
||||
|
||||
def disable_vpc_classic_link_dns_support(self):
|
||||
self.classic_link_dns_supported = 'false'
|
||||
self.classic_link_dns_supported = "false"
|
||||
return self.classic_link_dns_supported
|
||||
|
||||
def disassociate_vpc_cidr_block(self, association_id):
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class VPCs(BaseResponse):
|
|||
return template.render(vpc_id=vpc_id, attribute=attribute, value=value)
|
||||
|
||||
def describe_vpc_classic_link_dns_support(self):
|
||||
vpc_ids = self._get_multi_param('VpcIds')
|
||||
vpc_ids = self._get_multi_param("VpcIds")
|
||||
filters = filters_from_querystring(self.querystring)
|
||||
vpcs = self.ec2_backend.get_all_vpcs(vpc_ids=vpc_ids, filters=filters)
|
||||
doc_date = self._get_doc_date()
|
||||
|
|
@ -49,21 +49,21 @@ class VPCs(BaseResponse):
|
|||
return template.render(vpcs=vpcs, doc_date=doc_date)
|
||||
|
||||
def enable_vpc_classic_link_dns_support(self):
|
||||
vpc_id = self._get_param('VpcId')
|
||||
vpc_id = self._get_param("VpcId")
|
||||
classic_link_dns_supported = self.ec2_backend.enable_vpc_classic_link_dns_support(vpc_id=vpc_id)
|
||||
doc_date = self._get_doc_date()
|
||||
template = self.response_template(ENABLE_VPC_CLASSIC_LINK_DNS_SUPPORT_RESPONSE)
|
||||
return template.render(classic_link_dns_supported=classic_link_dns_supported, doc_date=doc_date)
|
||||
|
||||
def disable_vpc_classic_link_dns_support(self):
|
||||
vpc_id = self._get_param('VpcId')
|
||||
vpc_id = self._get_param("VpcId")
|
||||
classic_link_dns_supported = self.ec2_backend.disable_vpc_classic_link_dns_support(vpc_id=vpc_id)
|
||||
doc_date = self._get_doc_date()
|
||||
template = self.response_template(DISABLE_VPC_CLASSIC_LINK_DNS_SUPPORT_RESPONSE)
|
||||
return template.render(classic_link_dns_supported=classic_link_dns_supported, doc_date=doc_date)
|
||||
|
||||
def describe_vpc_classic_link(self):
|
||||
vpc_ids = self._get_multi_param('VpcId')
|
||||
vpc_ids = self._get_multi_param("VpcId")
|
||||
filters = filters_from_querystring(self.querystring)
|
||||
vpcs = self.ec2_backend.get_all_vpcs(vpc_ids=vpc_ids, filters=filters)
|
||||
doc_date = self._get_doc_date()
|
||||
|
|
@ -71,14 +71,14 @@ class VPCs(BaseResponse):
|
|||
return template.render(vpcs=vpcs, doc_date=doc_date)
|
||||
|
||||
def enable_vpc_classic_link(self):
|
||||
vpc_id = self._get_param('VpcId')
|
||||
vpc_id = self._get_param("VpcId")
|
||||
classic_link_enabled = self.ec2_backend.enable_vpc_classic_link(vpc_id=vpc_id)
|
||||
doc_date = self._get_doc_date()
|
||||
template = self.response_template(ENABLE_VPC_CLASSIC_LINK_RESPONSE)
|
||||
return template.render(classic_link_enabled=classic_link_enabled, doc_date=doc_date)
|
||||
|
||||
def disable_vpc_classic_link(self):
|
||||
vpc_id = self._get_param('VpcId')
|
||||
vpc_id = self._get_param("VpcId")
|
||||
classic_link_enabled = self.ec2_backend.disable_vpc_classic_link(vpc_id=vpc_id)
|
||||
doc_date = self._get_doc_date()
|
||||
template = self.response_template(DISABLE_VPC_CLASSIC_LINK_RESPONSE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue