Add segments attribute to OS::Neutron::ProviderNet

Adds a attribute to the neutron ProviderNet resource to get the
segments of a provider network.

Change-Id: I27656822fd10dffbcaeda016c27a47974313a65d
Story: 2007260
Task: 38622
This commit is contained in:
Victor Coutellier 2020-02-04 19:37:30 +01:00 committed by Rico Lin
parent bc7c8500e8
commit 1dcbac064c
2 changed files with 11 additions and 2 deletions

View File

@ -46,9 +46,9 @@ class ProviderNet(net.Net):
)
ATTRIBUTES = (
STATUS, SUBNETS,
STATUS, SUBNETS, SEGMENTS,
) = (
'status', 'subnets',
'status', 'subnets', 'segments',
)
NETWORK_TYPES = (
@ -121,6 +121,11 @@ class ProviderNet(net.Net):
_("Subnets of this network."),
type=attributes.Schema.LIST
),
SEGMENTS: attributes.Schema(
_("The segments of this network."),
type=attributes.Schema.LIST,
support_status=support.SupportStatus(version='16.0.0'),
),
}
def validate(self):

View File

@ -0,0 +1,4 @@
---
features:
- Adds a new ``segments`` attribute to the ``OS::Neutron::ProviderNet``
resource. The attribute resolves the segments of the network.