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:
parent
578f7fa572
commit
6885833e20
@ -18,19 +18,14 @@
|
|||||||
from quantum.api import extensions
|
from quantum.api import extensions
|
||||||
from quantum.api.v2 import attributes
|
from quantum.api.v2 import attributes
|
||||||
|
|
||||||
|
|
||||||
NETWORK_TYPE = 'provider:network_type'
|
NETWORK_TYPE = 'provider:network_type'
|
||||||
PHYSICAL_NETWORK = 'provider:physical_network'
|
PHYSICAL_NETWORK = 'provider:physical_network'
|
||||||
SEGMENTATION_ID = 'provider:segmentation_id'
|
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 = {
|
EXTENDED_ATTRIBUTES_2_0 = {
|
||||||
'networks': {
|
'networks': {
|
||||||
NETWORK_TYPE: {'allow_post': True, 'allow_put': True,
|
NETWORK_TYPE: {'allow_post': True, 'allow_put': True,
|
||||||
'validate': {'type:values': NETWORK_TYPE_VALUES},
|
'validate': {'type:string': None},
|
||||||
'default': attributes.ATTR_NOT_SPECIFIED,
|
'default': attributes.ATTR_NOT_SPECIFIED,
|
||||||
'is_visible': True},
|
'is_visible': True},
|
||||||
PHYSICAL_NETWORK: {'allow_post': True, 'allow_put': True,
|
PHYSICAL_NETWORK: {'allow_post': True, 'allow_put': True,
|
||||||
|
Loading…
Reference in New Issue
Block a user