Merge "Add missing tenant_id validation in RESOURCE_ATTRIBUTE_MAP"

This commit is contained in:
Jenkins 2015-08-21 00:48:30 +00:00 committed by Gerrit Code Review
commit 6eaac2bf4a
3 changed files with 5 additions and 1 deletions

View File

@ -830,7 +830,7 @@ RESOURCE_ATTRIBUTE_MAP = {
'is_visible': True},
'tenant_id': {'allow_post': True,
'allow_put': False,
'validate': {'type:string': None},
'validate': {'type:string': TENANT_ID_MAX_LEN},
'required_by_policy': True,
'is_visible': True},
'prefixes': {'allow_post': True,

View File

@ -55,6 +55,7 @@ RESOURCE_ATTRIBUTE_MAP = {
'is_visible': True, 'default': ''},
'tenant_id': {'allow_post': True, 'allow_put': False,
'required_by_policy': True,
'validate': {'type:string': attr.TENANT_ID_MAX_LEN},
'is_visible': True},
'shared': {'allow_post': True, 'allow_put': False,
'is_visible': True, 'default': False,
@ -78,6 +79,7 @@ RESOURCE_ATTRIBUTE_MAP = {
'validate': {'type:subnet': None}},
'tenant_id': {'allow_post': True, 'allow_put': False,
'required_by_policy': True,
'validate': {'type:string': attr.TENANT_ID_MAX_LEN},
'is_visible': True}
}
}

View File

@ -217,6 +217,7 @@ RESOURCE_ATTRIBUTE_MAP = {
'is_visible': True, 'default': ''},
'tenant_id': {'allow_post': True, 'allow_put': False,
'required_by_policy': True,
'validate': {'type:string': attr.TENANT_ID_MAX_LEN},
'is_visible': True},
'security_group_rules': {'allow_post': False, 'allow_put': False,
'is_visible': True},
@ -251,6 +252,7 @@ RESOURCE_ATTRIBUTE_MAP = {
'convert_to': convert_ip_prefix_to_cidr},
'tenant_id': {'allow_post': True, 'allow_put': False,
'required_by_policy': True,
'validate': {'type:string': attr.TENANT_ID_MAX_LEN},
'is_visible': True},
}
}