Add network_ip_availability pagging and sorting support

Add "network_ip_availability" pagging and sorting support, defining
"network_id" as primary key. This primary key is unique per register
retrieved and is needed by ``neutron.api.v2.base.Controller`` to
create the pagination helper.

This patch modifies an existing API extension instead of creating a new
one. However:
- This modification does not affect the Neutron behaviour without a code
  change in the "network_ip_availability" extension enabling the pagging
  support. The Neutron code change implies a bump in the neutron-lib
  version.
- Adding a new extension to modify the current one is overengineering.

Partial-Bug: #1940518

Change-Id: I4fa575f726fc0a7b7066f749e3b3f90ecc520087
This commit is contained in:
Rodolfo Alonso Hernandez 2021-08-19 13:39:12 +00:00 committed by Rodolfo Alonso
parent 13363b4d0d
commit 4c9bfc15b7
2 changed files with 7 additions and 1 deletions

View File

@ -27,7 +27,8 @@ RESOURCE_ATTRIBUTE_MAP = {
RESOURCE_PLURAL: {
'network_id': {
'allow_post': False, 'allow_put': False,
'is_visible': True, 'is_filter': True
'is_visible': True, 'is_filter': True,
'primary_key': True, 'is_sort_key': True
},
'network_name': {
'allow_post': False, 'allow_put': False,

View File

@ -0,0 +1,5 @@
---
features:
- |
Added pagging and sorting support for ``network-ip-availability`` API
extension. The primary key is ``network_id``.