diff --git a/neutron_lib/api/definitions/subnet.py b/neutron_lib/api/definitions/subnet.py index 33644c723..0bb3b1248 100644 --- a/neutron_lib/api/definitions/subnet.py +++ b/neutron_lib/api/definitions/subnet.py @@ -68,6 +68,7 @@ RESOURCE_ATTRIBUTE_MAP = { 'cidr': {'allow_post': True, 'allow_put': False, 'default': constants.ATTR_NOT_SPECIFIED, + 'convert_to': converters.convert_cidr_to_canonical_format, 'validate': {'type:subnet_or_none': None}, 'required_by_policy': False, 'is_filter': True, @@ -75,14 +76,17 @@ RESOURCE_ATTRIBUTE_MAP = { 'is_visible': True}, 'gateway_ip': {'allow_post': True, 'allow_put': True, 'default': constants.ATTR_NOT_SPECIFIED, + 'convert_to': converters.convert_ip_to_canonical_format, 'validate': {'type:ip_address_or_none': None}, 'is_filter': True, 'is_sort_key': True, 'is_visible': True}, - 'allocation_pools': {'allow_post': True, 'allow_put': True, - 'default': constants.ATTR_NOT_SPECIFIED, - 'validate': {'type:ip_pools': None}, - 'is_visible': True}, + 'allocation_pools': { + 'allow_post': True, 'allow_put': True, + 'default': constants.ATTR_NOT_SPECIFIED, + 'convert_to': converters.convert_ip_to_canonical_format, + 'validate': {'type:ip_pools': None}, + 'is_visible': True}, 'dns_nameservers': {'allow_post': True, 'allow_put': True, 'convert_to': converters.convert_none_to_empty_list, diff --git a/releasenotes/notes/ipv6-canonical-address-13900a784f847ce3.yaml b/releasenotes/notes/ipv6-canonical-address-13900a784f847ce3.yaml new file mode 100644 index 000000000..f3af7e761 --- /dev/null +++ b/releasenotes/notes/ipv6-canonical-address-13900a784f847ce3.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + The ``gateway`` , ``allocation_pools`` and ``cidr`` attributes of a Subnet with IPv6 addresses + are now converted to IPv6 canonical format to address. + `bug 1531103 `_