Merge "Bump the version to 1.4 for host list api control"
This commit is contained in:
commit
bd2e89b438
@ -51,7 +51,7 @@ class HostController(base.Controller):
|
||||
"""Host info controller"""
|
||||
|
||||
@pecan.expose('json')
|
||||
@base.Controller.api_version("1.3")
|
||||
@base.Controller.api_version("1.4")
|
||||
@exception.wrap_pecan_controller_exception
|
||||
def get_all(self, **kwargs):
|
||||
"""Retrieve a list of hosts"""
|
||||
|
@ -32,7 +32,7 @@ class TestHostController(api_base.FunctionalTest):
|
||||
mock_host_list.return_value = hosts
|
||||
|
||||
extra_environ = {'HTTP_ACCEPT': 'application/json'}
|
||||
headers = {'OpenStack-API-Version': 'container 1.3'}
|
||||
headers = {'OpenStack-API-Version': 'container 1.4'}
|
||||
response = self.app.get('/v1/hosts/', extra_environ=extra_environ,
|
||||
headers=headers)
|
||||
|
||||
@ -58,7 +58,7 @@ class TestHostController(api_base.FunctionalTest):
|
||||
host_list.append(host)
|
||||
mock_host_list.return_value = host_list[-1:]
|
||||
extra_environ = {'HTTP_ACCEPT': 'application/json'}
|
||||
headers = {'OpenStack-API-Version': 'container 1.3'}
|
||||
headers = {'OpenStack-API-Version': 'container 1.4'}
|
||||
response = self.app.get('/v1/hosts/?limit=3&marker=%s'
|
||||
% host_list[2].uuid,
|
||||
extra_environ=extra_environ, headers=headers)
|
||||
@ -83,7 +83,7 @@ class TestHostEnforcement(api_base.FunctionalTest):
|
||||
|
||||
def test_policy_disallow_get_all(self):
|
||||
extra_environ = {'HTTP_ACCEPT': 'application/json'}
|
||||
headers = {'OpenStack-API-Version': 'container 1.3'}
|
||||
headers = {'OpenStack-API-Version': 'container 1.4'}
|
||||
self._common_policy_check(
|
||||
'host:get_all', self.get_json, '/hosts/',
|
||||
expect_errors=True, extra_environ=extra_environ, headers=headers)
|
||||
|
Loading…
Reference in New Issue
Block a user