rehome the qos rule type details api def

This patch rehomes the qos-rule-type-details extension's API definition
into neutron-lib. UT and release note also included.

Change-Id: I068fec43604b89dcc6e47c2793f8267c615144b4
This commit is contained in:
Boden R 2017-11-22 13:25:06 -07:00
parent 46577db43a
commit f44ad80859
4 changed files with 69 additions and 0 deletions

View File

@ -55,6 +55,7 @@ from neutron_lib.api.definitions import project_id
from neutron_lib.api.definitions import provider_net
from neutron_lib.api.definitions import qos
from neutron_lib.api.definitions import qos_default
from neutron_lib.api.definitions import qos_rule_type_details
from neutron_lib.api.definitions import router_availability_zone
from neutron_lib.api.definitions import router_interface_fip
from neutron_lib.api.definitions import servicetype
@ -111,6 +112,7 @@ _ALL_API_DEFINITIONS = {
provider_net,
qos,
qos_default,
qos_rule_type_details,
router_availability_zone,
router_interface_fip,
servicetype,

View File

@ -0,0 +1,42 @@
# Copyright (c) 2017 OVH SAS
# All rights reserved.
#
# 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 qos as qos_apidef
DRIVERS = 'drivers'
ALIAS = 'qos-rule-type-details'
IS_SHIM_EXTENSION = False
IS_STANDARD_ATTR_EXTENSION = False
NAME = 'Details of QoS rule types'
API_PREFIX = ''
DESCRIPTION = ("Expose details about QoS rule types supported by loaded "
"backend drivers")
UPDATED_TIMESTAMP = '2017-06-22T10:00:00-00:00'
RESOURCE_ATTRIBUTE_MAP = {
qos_apidef.RULE_TYPES: {
DRIVERS: {
'allow_post': False,
'allow_put': False,
'is_visible': True
}
}
}
SUB_RESOURCE_ATTRIBUTE_MAP = {}
ACTION_MAP = {}
REQUIRED_EXTENSIONS = [qos_apidef.ALIAS]
OPTIONAL_EXTENSIONS = []
ACTION_STATUS = {}

View File

@ -0,0 +1,21 @@
# 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 qos_rule_type_details
from neutron_lib.tests.unit.api.definitions import base
from neutron_lib.tests.unit.api.definitions import test_qos
class QosRuleTypeDetailsTestCase(base.DefinitionBaseTestCase):
extension_module = qos_rule_type_details
extension_resources = test_qos.QoSDefinitionTestCase.extension_resources
extension_attributes = (qos_rule_type_details.DRIVERS,)

View File

@ -0,0 +1,4 @@
---
features:
- The ``qos-rule-type-details`` extension's API definition is now available
in ``neutron_lib.api.definitions.qos_rule_type_details``.