From 0d08f225279cad617e4825c90abde8fdd257a13d Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Wed, 23 Sep 2026 11:59:56 +0200 Subject: [PATCH] l3-ndp-proxy: Add ``is_filter`` to API definition The L3 NDP proxy API definition was partially updated when ``is_filter`` was introduced. The ``name`` attribute already declared ``is_filter``, but ``id``, ``project_id``, ``router_id``, ``port_id``, ``ip_address``, and ``description`` did not. With filter-validation enabled, list operations using query filters on those attributes return HTTP 400. Add ``is_filter: True`` to the six remaining scalar attributes and reformat the attribute map to match the multi-line style used in other updated API definitions. Related-Bug: #2167310 Assisted-By: Composer 2.5 Signed-off-by: Rodolfo Alonso Hernandez Change-Id: I5dfacb08d0e0786f877ac53f02855354e15c3717 --- neutron_lib/api/definitions/l3_ndp_proxy.py | 104 +++++++++++------- ...r-to-api-definitions-b8c4f2a1e6d34971.yaml | 9 ++ 2 files changed, 71 insertions(+), 42 deletions(-) create mode 100644 releasenotes/notes/l3-ndp-proxy-add-is-filter-to-api-definitions-b8c4f2a1e6d34971.yaml 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.