[WIP] Add project ID as a property to the ProviderNet resource

This patch will add the project ID to the existing neutron ProviderNet
resource. This new property will add new value by allowing a tenant to
associate a project ID with the provider network.

Change-Id: I0dab229a1731c8f61a389a70a2378e5627ba3766
This commit is contained in:
Cliff Parsons 2019-11-08 16:54:55 -06:00
parent 49a2a1e55a
commit 089a050b3b
2 changed files with 10 additions and 2 deletions

View File

@ -37,12 +37,12 @@ class ProviderNet(net.Net):
PROPERTIES = (
NAME, PROVIDER_NETWORK_TYPE, PROVIDER_PHYSICAL_NETWORK,
PROVIDER_SEGMENTATION_ID, ADMIN_STATE_UP, SHARED,
PORT_SECURITY_ENABLED, ROUTER_EXTERNAL, TAGS,
PORT_SECURITY_ENABLED, ROUTER_EXTERNAL, TAGS, PROJECT_ID,
) = (
'name', 'network_type', 'physical_network',
'segmentation_id', 'admin_state_up', 'shared',
'port_security_enabled', 'router_external', 'tags',
'project_id',
)
ATTRIBUTES = (
@ -110,6 +110,12 @@ class ProviderNet(net.Net):
update_allowed=True,
support_status=support.SupportStatus(version='12.0.0')
),
PROJECT_ID: properties.Schema(
properties.Schema.STRING,
_('Project owning the network.'),
update_allowed=False,
required=False
),
}
attributes_schema = {

View File

@ -43,6 +43,7 @@ resources:
tags:
- tag1
- tag2
project_id: c1210485b2424d48804aad5d39c61b8f
'''
stpna = {
@ -161,6 +162,7 @@ class NeutronProviderNetTest(common.HeatTestCase):
'port_security_enabled': False,
'router_external': True,
'tags': [],
'project_id': '12345678910111213141516',
}
update_snippet = rsrc_defn.ResourceDefinition(rsrc.name, rsrc.type(),
prop_diff)