From 1dcbac064cf9e795cee114b81ae8fba77e72de50 Mon Sep 17 00:00:00 2001 From: Victor Coutellier Date: Tue, 4 Feb 2020 19:37:30 +0100 Subject: [PATCH] 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 --- heat/engine/resources/openstack/neutron/provider_net.py | 9 +++++++-- .../providernet-segments-attribute-cc20b22bf3a25e96.yaml | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/providernet-segments-attribute-cc20b22bf3a25e96.yaml diff --git a/heat/engine/resources/openstack/neutron/provider_net.py b/heat/engine/resources/openstack/neutron/provider_net.py index 342e9c3e4d..31fd470b0d 100644 --- a/heat/engine/resources/openstack/neutron/provider_net.py +++ b/heat/engine/resources/openstack/neutron/provider_net.py @@ -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): diff --git a/releasenotes/notes/providernet-segments-attribute-cc20b22bf3a25e96.yaml b/releasenotes/notes/providernet-segments-attribute-cc20b22bf3a25e96.yaml new file mode 100644 index 0000000000..ab76b9ecb7 --- /dev/null +++ b/releasenotes/notes/providernet-segments-attribute-cc20b22bf3a25e96.yaml @@ -0,0 +1,4 @@ +--- +features: + - Adds a new ``segments`` attribute to the ``OS::Neutron::ProviderNet`` + resource. The attribute resolves the segments of the network. \ No newline at end of file