From 83fe70910d9b84d9ee46f17f80505a8abba2a190 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Wed, 23 Sep 2026 11:58:45 +0200 Subject: [PATCH] servicetype: Add ``is_filter`` to API definition The service type API definition predates the introduction of ``is_filter``. No attribute on ``service_providers`` was declared as filterable, which causes list operations with query filters (e.g. ``?name=foo``) to return HTTP 400 when filter-validation is enabled. Add ``is_filter: True`` to the three scalar attributes (``service_type``, ``name``, and ``default``). Related-Bug: #2167310 Assisted-By: Composer 2.5 Signed-off-by: Rodolfo Alonso Hernandez Change-Id: I995df1a597023e1c49249636e5f87066707225c7 --- neutron_lib/api/definitions/servicetype.py | 3 +++ ...add-is-filter-to-api-definitions-a3b7e5c9d2f14860.yaml | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 releasenotes/notes/servicetype-add-is-filter-to-api-definitions-a3b7e5c9d2f14860.yaml diff --git a/neutron_lib/api/definitions/servicetype.py b/neutron_lib/api/definitions/servicetype.py index 461af1705..6a6c7d39e 100644 --- a/neutron_lib/api/definitions/servicetype.py +++ b/neutron_lib/api/definitions/servicetype.py @@ -38,16 +38,19 @@ RESOURCE_ATTRIBUTE_MAP: ResourceAttributeMap = { SERVICE_ATTR: { 'allow_post': False, 'allow_put': False, + 'is_filter': True, 'is_visible': True }, 'name': { 'allow_post': False, 'allow_put': False, + 'is_filter': True, 'is_visible': True }, 'default': { 'allow_post': False, 'allow_put': False, + 'is_filter': True, 'is_visible': True } } diff --git a/releasenotes/notes/servicetype-add-is-filter-to-api-definitions-a3b7e5c9d2f14860.yaml b/releasenotes/notes/servicetype-add-is-filter-to-api-definitions-a3b7e5c9d2f14860.yaml new file mode 100644 index 000000000..4142fc382 --- /dev/null +++ b/releasenotes/notes/servicetype-add-is-filter-to-api-definitions-a3b7e5c9d2f14860.yaml @@ -0,0 +1,8 @@ +--- +fixes: + - | + Added ``is_filter`` to all scalar attributes in the service type API + definition (``service_type``, ``name``, and ``default``). Previously, + no service provider attribute was declared as filterable, which caused + list operations with query filters (e.g. ``?name=foo``) to return HTTP + 400 when the filter-validation extension is enabled.