From 37d872925db59adc0f1e59562edf2b7a14ad2969 Mon Sep 17 00:00:00 2001 From: Boden R Date: Mon, 6 Nov 2017 14:43:13 -0700 Subject: [PATCH] use pagination api def from neutron-lib The pagination extension's API definition was rehomed into neutron-lib with commit I5b844cd834900ac5de53df490fef239154cc903c This patch consumes the API definition by removing the rehomed code from neutron as well as using the APIExtensionDescriptor for the pagination's extension class. NeutronLibImpact Change-Id: Ief469d75045f6f8b85abfe1fd2d68a4cee5db3b2 --- neutron/extensions/pagination.py | 33 +++++--------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/neutron/extensions/pagination.py b/neutron/extensions/pagination.py index da75aefda26..23be21f16b1 100644 --- a/neutron/extensions/pagination.py +++ b/neutron/extensions/pagination.py @@ -11,40 +11,17 @@ # See the License for the specific language governing permissions and # limitations under the License. +from neutron_lib.api.definitions import pagination as apidef from neutron_lib.api import extensions as api_extensions from neutron.api import extensions -_ALIAS = 'pagination' - - -class Pagination(api_extensions.ExtensionDescriptor): +class Pagination(api_extensions.APIExtensionDescriptor): """Fake extension that indicates that pagination is enabled.""" + api_definition = apidef + extensions.register_custom_supported_check( - _ALIAS, lambda: True, plugin_agnostic=True + apidef.ALIAS, lambda: True, plugin_agnostic=True ) - - @classmethod - def get_name(cls): - return "Pagination support" - - @classmethod - def get_alias(cls): - return _ALIAS - - @classmethod - def get_description(cls): - return "Extension that indicates that pagination is enabled." - - @classmethod - def get_updated(cls): - return "2016-06-12T00:00:00-00:00" - - @classmethod - def get_resources(cls): - return [] - - def get_extended_resources(self, version): - return {}