diff --git a/neutron_lib/api/definitions/l3_ndp_proxy.py b/neutron_lib/api/definitions/l3_ndp_proxy.py index f0bb720c4..4f3e756ee 100644 --- a/neutron_lib/api/definitions/l3_ndp_proxy.py +++ b/neutron_lib/api/definitions/l3_ndp_proxy.py @@ -66,48 +66,68 @@ DESCRIPTION = 'description' # The resource attribute map for the extension. RESOURCE_ATTRIBUTE_MAP: ResourceAttributeMap = { COLLECTION_NAME: { - ID: {'allow_post': False, - 'allow_put': False, - 'validate': {'type:uuid': None}, - 'is_visible': True, - 'is_sort_key': True, - 'primary_key': True}, - NAME: {'allow_post': True, - 'allow_put': True, - 'validate': {'type:name_string': db_const.NAME_FIELD_SIZE}, - 'is_filter': True, - 'is_sort_key': True, - 'is_visible': True, 'default': ''}, - PROJECT_ID: {'allow_post': True, - 'allow_put': False, - 'required_by_policy': True, - 'validate': { - 'type:string': db_const.PROJECT_ID_FIELD_SIZE}, - 'is_sort_key': True, - 'is_visible': True}, - ROUTER_ID: {'allow_post': True, - 'allow_put': False, - 'validate': {'type:uuid': None}, - 'is_sort_key': True, - 'is_visible': True}, - PORT_ID: {'allow_post': True, - 'allow_put': False, - 'validate': {'type:uuid': None}, - 'is_sort_key': True, - 'is_visible': True}, - IP_ADDRESS: {'allow_post': True, - 'allow_put': False, - 'default': None, - 'validate': { - 'type:ip_address_or_none': None}, - 'is_sort_key': True, - 'is_visible': True}, - DESCRIPTION: {'allow_post': True, - 'allow_put': True, - 'default': '', - 'validate': {'type:string': - db_const.LONG_DESCRIPTION_FIELD_SIZE}, - 'is_visible': True} + ID: { + 'allow_post': False, + 'allow_put': False, + 'validate': {'type:uuid': None}, + 'is_filter': True, + 'is_sort_key': True, + 'is_visible': True, + 'primary_key': True + }, + NAME: { + 'allow_post': True, + 'allow_put': True, + 'validate': {'type:name_string': db_const.NAME_FIELD_SIZE}, + 'is_filter': True, + 'is_sort_key': True, + 'is_visible': True, + 'default': '' + }, + PROJECT_ID: { + 'allow_post': True, + 'allow_put': False, + 'required_by_policy': True, + 'validate': { + 'type:string': db_const.PROJECT_ID_FIELD_SIZE}, + 'is_filter': True, + 'is_sort_key': True, + 'is_visible': True + }, + ROUTER_ID: { + 'allow_post': True, + 'allow_put': False, + 'validate': {'type:uuid': None}, + 'is_filter': True, + 'is_sort_key': True, + 'is_visible': True + }, + PORT_ID: { + 'allow_post': True, + 'allow_put': False, + 'validate': {'type:uuid': None}, + 'is_filter': True, + 'is_sort_key': True, + 'is_visible': True + }, + IP_ADDRESS: { + 'allow_post': True, + 'allow_put': False, + 'default': None, + 'validate': {'type:ip_address_or_none': None}, + 'is_filter': True, + 'is_sort_key': True, + 'is_visible': True + }, + DESCRIPTION: { + 'allow_post': True, + 'allow_put': True, + 'default': '', + 'validate': {'type:string': + db_const.LONG_DESCRIPTION_FIELD_SIZE}, + 'is_filter': True, + 'is_visible': True + } } } diff --git a/releasenotes/notes/l3-ndp-proxy-add-is-filter-to-api-definitions-b8c4f2a1e6d34971.yaml b/releasenotes/notes/l3-ndp-proxy-add-is-filter-to-api-definitions-b8c4f2a1e6d34971.yaml new file mode 100644 index 000000000..8f4db023d --- /dev/null +++ b/releasenotes/notes/l3-ndp-proxy-add-is-filter-to-api-definitions-b8c4f2a1e6d34971.yaml @@ -0,0 +1,9 @@ +--- +fixes: + - | + Added ``is_filter`` to the remaining scalar attributes in the L3 NDP + proxy API definition (``id``, ``project_id``, ``router_id``, ``port_id``, + ``ip_address``, and ``description``). The ``name`` attribute already + declared ``is_filter``, but the others did not, which caused list + operations with query filters to return HTTP 400 when the + filter-validation extension is enabled.