[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:
parent
49a2a1e55a
commit
089a050b3b
|
@ -37,12 +37,12 @@ class ProviderNet(net.Net):
|
||||||
PROPERTIES = (
|
PROPERTIES = (
|
||||||
NAME, PROVIDER_NETWORK_TYPE, PROVIDER_PHYSICAL_NETWORK,
|
NAME, PROVIDER_NETWORK_TYPE, PROVIDER_PHYSICAL_NETWORK,
|
||||||
PROVIDER_SEGMENTATION_ID, ADMIN_STATE_UP, SHARED,
|
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',
|
'name', 'network_type', 'physical_network',
|
||||||
'segmentation_id', 'admin_state_up', 'shared',
|
'segmentation_id', 'admin_state_up', 'shared',
|
||||||
'port_security_enabled', 'router_external', 'tags',
|
'port_security_enabled', 'router_external', 'tags',
|
||||||
|
'project_id',
|
||||||
)
|
)
|
||||||
|
|
||||||
ATTRIBUTES = (
|
ATTRIBUTES = (
|
||||||
|
@ -110,6 +110,12 @@ class ProviderNet(net.Net):
|
||||||
update_allowed=True,
|
update_allowed=True,
|
||||||
support_status=support.SupportStatus(version='12.0.0')
|
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 = {
|
attributes_schema = {
|
||||||
|
|
|
@ -43,6 +43,7 @@ resources:
|
||||||
tags:
|
tags:
|
||||||
- tag1
|
- tag1
|
||||||
- tag2
|
- tag2
|
||||||
|
project_id: c1210485b2424d48804aad5d39c61b8f
|
||||||
'''
|
'''
|
||||||
|
|
||||||
stpna = {
|
stpna = {
|
||||||
|
@ -161,6 +162,7 @@ class NeutronProviderNetTest(common.HeatTestCase):
|
||||||
'port_security_enabled': False,
|
'port_security_enabled': False,
|
||||||
'router_external': True,
|
'router_external': True,
|
||||||
'tags': [],
|
'tags': [],
|
||||||
|
'project_id': '12345678910111213141516',
|
||||||
}
|
}
|
||||||
update_snippet = rsrc_defn.ResourceDefinition(rsrc.name, rsrc.type(),
|
update_snippet = rsrc_defn.ResourceDefinition(rsrc.name, rsrc.type(),
|
||||||
prop_diff)
|
prop_diff)
|
||||||
|
|
Loading…
Reference in New Issue