neutron/neutron/extensions/sorting.py
Boden R 3c7ac69262 use sorting api def from neutron-lib
The sorting extension's API definition was rehomed into neutron-lib with
commit I3349b83bc04b82ed333cb6560bbc5d41a7127e94
This patch consumes it by using the API def along with the
APIExtensionDescriptor parent class.

NeutronLibImpact

Change-Id: Ic32b3743c00150e8466475612f481413504f7293
2018-02-20 14:35:07 -07:00

28 lines
959 B
Python

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from neutron_lib.api.definitions import sorting as apidef
from neutron_lib.api import extensions as api_extensions
from neutron.api import extensions
class Sorting(api_extensions.APIExtensionDescriptor):
"""Fake extension that indicates that sorting is enabled."""
extensions.register_custom_supported_check(
apidef.ALIAS, lambda: True, plugin_agnostic=True
)
api_definition = apidef