diff --git a/API_REFERENCE.rst b/API_REFERENCE.rst index d45352e..0f763c4 100644 --- a/API_REFERENCE.rst +++ b/API_REFERENCE.rst @@ -71,11 +71,11 @@ TapFlow Represents the port from which the traffic needs to be mirrored. 'validate': {'type:uuid': None}, 'required_by_policy': True, 'is_visible': True}, 'direction': {'allow_post': True, 'allow_put': False, - 'validate': {'type:string': direction_enum}, + 'validate': {'type:values': direction_enum}, 'is_visible': True} } - direction_enum = [None, 'IN', 'OUT', 'BOTH'] + direction_enum = ['IN', 'OUT', 'BOTH'] Multiple TapFlow instances can be associated with a single TapService diff --git a/neutron_taas/extensions/taas.py b/neutron_taas/extensions/taas.py index e2bafb4..ffe64ba 100644 --- a/neutron_taas/extensions/taas.py +++ b/neutron_taas/extensions/taas.py @@ -61,7 +61,7 @@ class TapServiceLimitReached(qexception.OverQuota): message = _("Reached the maximum quota for Tap Services") -direction_enum = [None, 'IN', 'OUT', 'BOTH'] +direction_enum = ['IN', 'OUT', 'BOTH'] ''' @@ -117,7 +117,7 @@ RESOURCE_ATTRIBUTE_MAP = { 'validate': {'type:uuid': None}, 'required_by_policy': True, 'is_visible': True}, 'direction': {'allow_post': True, 'allow_put': False, - 'validate': {'type:string': direction_enum}, + 'validate': {'type:values': direction_enum}, 'is_visible': True} } }