Sync support network type for provider network

Now heat only supports 'vlan' and 'flat' network type
for OS::Neutron::ProviderNet, this will add all other
supported network types: 'vxlan', 'local', 'gre' and
'geneve'.

Change-Id: If7cb4fbc83f5aa62a0b73e003ff23ec2b40b2ded
Closes-Bug: #1692445
This commit is contained in:
huangtianhua 2017-05-22 16:33:14 +08:00 committed by Rabi Mishra
parent 86a1cc8c47
commit 4e6bb6febc
1 changed files with 7 additions and 1 deletions

View File

@ -51,6 +51,12 @@ class ProviderNet(net.Net):
'status', 'subnets', 'status', 'subnets',
) )
NETWORK_TYPES = (
LOCAL, VLAN, VXLAN, GRE, GENEVE, FLAT
) = (
'local', 'vlan', 'vxlan', 'gre', 'geneve', 'flat'
)
properties_schema = { properties_schema = {
NAME: net.Net.properties_schema[NAME], NAME: net.Net.properties_schema[NAME],
PROVIDER_NETWORK_TYPE: properties.Schema( PROVIDER_NETWORK_TYPE: properties.Schema(
@ -60,7 +66,7 @@ class ProviderNet(net.Net):
update_allowed=True, update_allowed=True,
required=True, required=True,
constraints=[ constraints=[
constraints.AllowedValues(['vlan', 'flat']), constraints.AllowedValues(NETWORK_TYPES),
] ]
), ),
PROVIDER_PHYSICAL_NETWORK: properties.Schema( PROVIDER_PHYSICAL_NETWORK: properties.Schema(