Use _validate_uuid in quantum.plugins.nec.extensions.packetfilter.py

Change-Id: I3564e492c41c5400e0935d364d536ca69b413c24
This commit is contained in:
Zhongyue Luo 2012-11-05 22:24:57 +08:00
parent 3f7f526dec
commit 8f71e18aeb
1 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ PACKET_FILTER_NUMBER_REGEX = "(?i)^(0x[0-9a-fA-F]+|[0-9]+)$"
PACKET_FILTER_PROTOCOL_REGEX = "(?i)^(icmp|tcp|udp|arp|0x[0-9a-fA-F]+|[0-9]+)$"
PACKET_FILTER_ATTR_MAP = {
'id': {'allow_post': False, 'allow_put': False,
'validate': {'type:regex': attributes.UUID_PATTERN},
'validate': {'type:uuid': None},
'is_visible': True},
'name': {'allow_post': True, 'allow_put': True, 'default': '',
'is_visible': True},
@ -46,7 +46,7 @@ PACKET_FILTER_ATTR_MAP = {
'required_by_policy': True,
'is_visible': True},
'network_id': {'allow_post': True, 'allow_put': False,
'validate': {'type:regex': attributes.UUID_PATTERN},
'validate': {'type:uuid': None},
'is_visible': True},
'admin_state_up': {'allow_post': True, 'allow_put': True,
'default': True,
@ -63,7 +63,7 @@ PACKET_FILTER_ATTR_MAP = {
'is_visible': True},
'in_port': {'allow_post': True, 'allow_put': True,
'default': attributes.ATTR_NOT_SPECIFIED,
'validate': {'type:regex': attributes.UUID_PATTERN},
'validate': {'type:uuid': None},
'is_visible': True},
'src_mac': {'allow_post': True, 'allow_put': True,
'default': attributes.ATTR_NOT_SPECIFIED,