Directory Service: Handle IPV6 addresses and no tags (#4541)
This commit is contained in:
parent
de9fe5a1e1
commit
a62e33cacb
@ -107,7 +107,7 @@ class Directory(BaseModel): # pylint: disable=too-many-instance-attributes
|
|||||||
"""
|
"""
|
||||||
ip_addrs = []
|
ip_addrs = []
|
||||||
for subnet in subnets:
|
for subnet in subnets:
|
||||||
ips = ipaddress.IPv4Network(subnet.cidr_block)
|
ips = ipaddress.ip_network(subnet.cidr_block)
|
||||||
# Not sure if the following could occur, but if it does,
|
# Not sure if the following could occur, but if it does,
|
||||||
# the situation will be ignored.
|
# the situation will be ignored.
|
||||||
if ips:
|
if ips:
|
||||||
|
@ -23,7 +23,7 @@ class DirectoryServiceResponse(BaseResponse):
|
|||||||
description = self._get_param("Description")
|
description = self._get_param("Description")
|
||||||
size = self._get_param("Size")
|
size = self._get_param("Size")
|
||||||
connect_settings = self._get_param("ConnectSettings")
|
connect_settings = self._get_param("ConnectSettings")
|
||||||
tags = self._get_param("Tags")
|
tags = self._get_param("Tags", [])
|
||||||
directory_id = self.ds_backend.connect_directory(
|
directory_id = self.ds_backend.connect_directory(
|
||||||
region=self.region,
|
region=self.region,
|
||||||
name=name,
|
name=name,
|
||||||
@ -44,7 +44,7 @@ class DirectoryServiceResponse(BaseResponse):
|
|||||||
description = self._get_param("Description")
|
description = self._get_param("Description")
|
||||||
size = self._get_param("Size")
|
size = self._get_param("Size")
|
||||||
vpc_settings = self._get_param("VpcSettings")
|
vpc_settings = self._get_param("VpcSettings")
|
||||||
tags = self._get_param("Tags")
|
tags = self._get_param("Tags", [])
|
||||||
directory_id = self.ds_backend.create_directory(
|
directory_id = self.ds_backend.create_directory(
|
||||||
region=self.region,
|
region=self.region,
|
||||||
name=name,
|
name=name,
|
||||||
@ -72,7 +72,7 @@ class DirectoryServiceResponse(BaseResponse):
|
|||||||
description = self._get_param("Description")
|
description = self._get_param("Description")
|
||||||
vpc_settings = self._get_param("VpcSettings")
|
vpc_settings = self._get_param("VpcSettings")
|
||||||
edition = self._get_param("Edition")
|
edition = self._get_param("Edition")
|
||||||
tags = self._get_param("Tags")
|
tags = self._get_param("Tags", [])
|
||||||
directory_id = self.ds_backend.create_microsoft_ad(
|
directory_id = self.ds_backend.create_microsoft_ad(
|
||||||
region=self.region,
|
region=self.region,
|
||||||
name=name,
|
name=name,
|
||||||
|
Loading…
Reference in New Issue
Block a user