Remove network type validation from provider networks extension

Bug 1133064

As the set of valid network types for the provider networks extension
depends on the particular plugin, validation should be performed there.

Change-Id: I3ce5762458bc553625a458ace80072bd804e31f0
This commit is contained in:
Salvatore Orlando 2013-02-25 11:37:34 +01:00
parent 9f6adb4b26
commit c2653d519d

View File

@ -18,19 +18,14 @@
from quantum.api import extensions
from quantum.api.v2 import attributes
NETWORK_TYPE = 'provider:network_type'
PHYSICAL_NETWORK = 'provider:physical_network'
SEGMENTATION_ID = 'provider:segmentation_id'
# TODO(salvatore-orlando): Devise a solution for allowing plugins
# to alter the set of allowed values
NETWORK_TYPE_VALUES = ['flat', 'gre', 'local', 'vlan', 'stt']
EXTENDED_ATTRIBUTES_2_0 = {
'networks': {
NETWORK_TYPE: {'allow_post': True, 'allow_put': True,
'validate': {'type:values': NETWORK_TYPE_VALUES},
'validate': {'type:string': None},
'default': attributes.ATTR_NOT_SPECIFIED,
'is_visible': True},
PHYSICAL_NETWORK: {'allow_post': True, 'allow_put': True,