Use is_uuid_like in quantum.extensions.securitygroup.py

Change-Id: If86cea62a918ed9bc826b9c9b22130b5d7c967f1
This commit is contained in:
Zhongyue Luo 2012-11-06 00:19:46 +08:00
parent 3f7f526dec
commit d168279def
1 changed files with 2 additions and 2 deletions

View 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,