]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Remove network type validation from provider networks extension
authorSalvatore Orlando <salv.orlando@gmail.com>
Mon, 25 Feb 2013 10:37:34 +0000 (11:37 +0100)
committerSalvatore Orlando <salv.orlando@gmail.com>
Tue, 26 Feb 2013 17:21:40 +0000 (18:21 +0100)
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

quantum/extensions/providernet.py

index 1422fbad46cf023819c2f22955ffa6239b2aa1ab..b37436c25f632adb0e9e02d927c6c61ba8d4d868 100644 (file)
 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,