Directory Service: Handle IPV6 addresses and no tags (#4541)

This commit is contained in:
kbalk 2021-11-08 17:53:33 -05:00 committed by GitHub
parent de9fe5a1e1
commit a62e33cacb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -107,7 +107,7 @@ class Directory(BaseModel): # pylint: disable=too-many-instance-attributes
"""
ip_addrs = []
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,
# the situation will be ignored.
if ips:

View File

@ -23,7 +23,7 @@ class DirectoryServiceResponse(BaseResponse):
description = self._get_param("Description")
size = self._get_param("Size")
connect_settings = self._get_param("ConnectSettings")
tags = self._get_param("Tags")
tags = self._get_param("Tags", [])
directory_id = self.ds_backend.connect_directory(
region=self.region,
name=name,
@ -44,7 +44,7 @@ class DirectoryServiceResponse(BaseResponse):
description = self._get_param("Description")
size = self._get_param("Size")
vpc_settings = self._get_param("VpcSettings")
tags = self._get_param("Tags")
tags = self._get_param("Tags", [])
directory_id = self.ds_backend.create_directory(
region=self.region,
name=name,
@ -72,7 +72,7 @@ class DirectoryServiceResponse(BaseResponse):
description = self._get_param("Description")
vpc_settings = self._get_param("VpcSettings")
edition = self._get_param("Edition")
tags = self._get_param("Tags")
tags = self._get_param("Tags", [])
directory_id = self.ds_backend.create_microsoft_ad(
region=self.region,
name=name,