diff --git a/neutron_lib/api/definitions/base.py b/neutron_lib/api/definitions/base.py index edddd7c46..019394a98 100644 --- a/neutron_lib/api/definitions/base.py +++ b/neutron_lib/api/definitions/base.py @@ -122,6 +122,7 @@ KNOWN_EXTENSIONS = ( 'sorting', 'standard-attr-description', 'standard-attr-revisions', + 'standard-attr-segment', 'standard-attr-timestamp', 'subnet_allocation', 'subnet_onboard', diff --git a/neutron_lib/api/definitions/segment.py b/neutron_lib/api/definitions/segment.py index f6e002935..c4ae624ad 100644 --- a/neutron_lib/api/definitions/segment.py +++ b/neutron_lib/api/definitions/segment.py @@ -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 = {} diff --git a/releasenotes/notes/update-segment-api-definition-d7297e73e76a754c.yaml b/releasenotes/notes/update-segment-api-definition-d7297e73e76a754c.yaml new file mode 100644 index 000000000..c47ceb38c --- /dev/null +++ b/releasenotes/notes/update-segment-api-definition-d7297e73e76a754c.yaml @@ -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.