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 f9ef958712
commit fa57f9eaa2

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,