Merge "remove policy check for host_routes in update_port"

This commit is contained in:
Jenkins 2012-08-30 11:49:48 +00:00 committed by Gerrit Code Review
commit 62efc6ed4e
3 changed files with 1 additions and 9 deletions

View File

@ -32,11 +32,9 @@
"create_port": [],
"create_port:mac_address": [["rule:admin_or_network_owner"]],
"create_port:host_routes": [["rule:admin_or_network_owner"]],
"create_port:fixed_ips": [["rule:admin_or_network_owner"]],
"get_port": [["rule:admin_or_owner"]],
"update_port": [["rule:admin_or_owner"]],
"update_port:host_routes": [["rule:admin_or_network_owner"]],
"update_port:fixed_ips": [["rule:admin_or_network_owner"]],
"delete_port": [["rule:admin_or_owner"]]
}

View File

@ -220,10 +220,6 @@ RESOURCE_ATTRIBUTE_MAP = {
'default': ATTR_NOT_SPECIFIED,
'enforce_policy': True,
'is_visible': True},
'host_routes': {'allow_post': True, 'allow_put': True,
'default': ATTR_NOT_SPECIFIED,
'enforce_policy': True,
'is_visible': False},
'device_id': {'allow_post': True, 'allow_put': True,
'default': '',
'is_visible': True},

View File

@ -494,13 +494,11 @@ class JSONV2TestCase(APIv2TestBase):
full_input = {'port': {'admin_state_up': True,
'mac_address': attributes.ATTR_NOT_SPECIFIED,
'fixed_ips': attributes.ATTR_NOT_SPECIFIED,
'device_owner': '',
'host_routes': attributes.ATTR_NOT_SPECIFIED}}
'device_owner': ''}}
full_input['port'].update(initial_input['port'])
return_value = {'id': _uuid(), 'status': 'ACTIVE',
'admin_state_up': True,
'mac_address': 'ca:fe:de:ad:be:ef',
'host_routes': [],
'device_id': device_id,
'device_owner': ''}
return_value.update(initial_input['port'])