Adds support for enable/disable/describe vpc-classic-link-dns-support.
This commit is contained in:
parent
17cc46b91e
commit
6d52cd06cb
4 changed files with 127 additions and 3 deletions
|
|
@ -2435,6 +2435,7 @@ class VPC(TaggedEC2Resource):
|
|||
self.instance_tenancy = instance_tenancy
|
||||
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"
|
||||
|
|
@ -2546,6 +2547,14 @@ class VPC(TaggedEC2Resource):
|
|||
self.classic_link_enabled = "false"
|
||||
return self.classic_link_enabled
|
||||
|
||||
def enable_vpc_classic_link_dns_support(self):
|
||||
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'
|
||||
return self.classic_link_dns_supported
|
||||
|
||||
def disassociate_vpc_cidr_block(self, association_id):
|
||||
if self.cidr_block == self.cidr_block_association_set.get(
|
||||
association_id, {}
|
||||
|
|
@ -2684,6 +2693,14 @@ class VPCBackend(object):
|
|||
vpc = self.get_vpc(vpc_id)
|
||||
return vpc.disable_vpc_classic_link()
|
||||
|
||||
def enable_vpc_classic_link_dns_support(self, vpc_id):
|
||||
vpc = self.get_vpc(vpc_id)
|
||||
return vpc.enable_vpc_classic_link_dns_support()
|
||||
|
||||
def disable_vpc_classic_link_dns_support(self, vpc_id):
|
||||
vpc = self.get_vpc(vpc_id)
|
||||
return vpc.disable_vpc_classic_link_dns_support()
|
||||
|
||||
def modify_vpc_attribute(self, vpc_id, attr_name, attr_value):
|
||||
vpc = self.get_vpc(vpc_id)
|
||||
if attr_name in ("enable_dns_support", "enable_dns_hostnames"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue