Add a shim extension standard-attr-segment

Neutron patch: https://review.openstack.org/#/c/562320/

Change-Id: I34616a01c6fc0617984272d577650420233041e1
Related-Bug: #1765008
Related-Bug: #1760902
This commit is contained in:
Hongbin Lu 2018-04-18 16:09:33 +00:00
parent 55e0a3c7dd
commit 9de5b2ee02
4 changed files with 56 additions and 0 deletions

View File

@ -75,6 +75,7 @@ from neutron_lib.api.definitions import segment
from neutron_lib.api.definitions import servicetype
from neutron_lib.api.definitions import sfc
from neutron_lib.api.definitions import sorting
from neutron_lib.api.definitions import standard_attr_segment
from neutron_lib.api.definitions import subnet
from neutron_lib.api.definitions import subnet_onboard
from neutron_lib.api.definitions import subnet_segmentid_writable
@ -153,6 +154,7 @@ _ALL_API_DEFINITIONS = {
servicetype,
sfc,
sorting,
standard_attr_segment,
subnet,
subnet_onboard,
subnet_segmentid_writable,

View File

@ -0,0 +1,31 @@
# 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 segment
ALIAS = 'standard-attr-segment'
IS_SHIM_EXTENSION = True
IS_STANDARD_ATTR_EXTENSION = True
NAME = 'Standard Attribute Segment Extension'
DESCRIPTION = 'Add standard attributes to Segment resource'
UPDATED_TIMESTAMP = '2018-04-09T10:00:00-00:00'
RESOURCE_ATTRIBUTE_MAP = {}
SUB_RESOURCE_ATTRIBUTE_MAP = {}
ACTION_MAP = {}
REQUIRED_EXTENSIONS = [segment.ALIAS]
OPTIONAL_EXTENSIONS = [
'standard-attr-description',
'standard-attr-timestamp',
'standard-attr-revisions'
]
ACTION_STATUS = {}

View File

@ -0,0 +1,18 @@
# 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 standard_attr_segment
from neutron_lib.tests.unit.api.definitions import base
class StandardAttrSegmentDefinitionTestCase(base.DefinitionBaseTestCase):
extension_module = standard_attr_segment

View File

@ -0,0 +1,5 @@
---
other:
- |
Add a shim extension ``standard-attr-segment`` to indicate if segment
resource contains standard attributes.