Update the segment api extension

The segment api definition is changed in server side [1]. This patch
sync up the definition in neutron-lib. In addition, remove the
dependency from standard-attr-segment on segment since the
dependency is reserved: we have segment depending on
standard-attr-segment with the latest change.

[1] https://review.openstack.org/#/c/571292/

Change-Id: I64780fc435da98d9b5d4e58c9e61d3d0b11d0daf
This commit is contained in:
Hongbin Lu 2018-06-25 16:37:52 +00:00
parent 34af1e37bb
commit e3d90fef65
3 changed files with 15 additions and 11 deletions

View File

@ -122,6 +122,7 @@ KNOWN_EXTENSIONS = (
'sorting',
'standard-attr-description',
'standard-attr-revisions',
'standard-attr-segment',
'standard-attr-timestamp',
'subnet_allocation',
'subnet_onboard',

View File

@ -104,15 +104,6 @@ RESOURCE_ATTRIBUTE_MAP = {
'is_filter': True,
'is_sort_key': True,
'is_visible': True
},
'description': {
'allow_post': True,
'allow_put': True,
'default': constants.ATTR_NOT_SPECIFIED,
'validate': {
'type:string_or_none': DESC_LEN
},
'is_visible': True
}
},
subnet.COLLECTION_NAME: {
@ -131,6 +122,11 @@ RESOURCE_ATTRIBUTE_MAP = {
}
SUB_RESOURCE_ATTRIBUTE_MAP = {}
ACTION_MAP = {}
REQUIRED_EXTENSIONS = []
OPTIONAL_EXTENSIONS = []
REQUIRED_EXTENSIONS = [
'standard-attr-description'
]
OPTIONAL_EXTENSIONS = [
# Use string instead of constant to avoid circulated import
'standard-attr-segment'
]
ACTION_STATUS = {}

View File

@ -0,0 +1,7 @@
---
other:
- |
This release removes the ``description`` from the segment extension's
attribute map as well as adds the ``standard-attr-description`` as
required dependency and ``standard-attr-segment`` as an optional
dependency.