]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Use is_uuid_like in quantum.extensions.securitygroup.py
authorZhongyue Luo <zhongyue.nah@intel.com>
Mon, 5 Nov 2012 16:19:46 +0000 (00:19 +0800)
committerZhongyue Luo <zhongyue.nah@intel.com>
Mon, 5 Nov 2012 16:19:46 +0000 (00:19 +0800)
Change-Id: If86cea62a918ed9bc826b9c9b22130b5d7c967f1

quantum/extensions/securitygroup.py

index 1257b4b59b263a9b08d61b7c01f8aa445a2c1eb5..148ed47269870294f6ceab6e3a25c7def366f7a6 100644 (file)
@@ -158,7 +158,7 @@ attr.validators['type:external_id_and_mode'] = _validate_external_id_and_mode
 RESOURCE_ATTRIBUTE_MAP = {
     'security_groups': {
         'id': {'allow_post': False, 'allow_put': False,
-               'validate': {'type:regex': attr.UUID_PATTERN},
+               'validate': {'type:uuid': None},
                'is_visible': True},
         'name': {'allow_post': True, 'allow_put': False,
                  'is_visible': True, 'default': '',
@@ -174,7 +174,7 @@ RESOURCE_ATTRIBUTE_MAP = {
     },
     'security_group_rules': {
         'id': {'allow_post': False, 'allow_put': False,
-               'validate': {'type:regex': attr.UUID_PATTERN},
+               'validate': {'type:uuid': None},
                'is_visible': True},
         # external_id can be used to be backwards compatible with nova
         'external_id': {'allow_post': True, 'allow_put': False,