Merge "Extend T110 check for lib's service clients"

This commit is contained in:
Jenkins 2016-04-11 03:47:31 +00:00 committed by Gerrit Code Review
commit 2595e65841
5 changed files with 25 additions and 7 deletions

View File

@ -151,7 +151,7 @@ def no_testtools_skip_decorator(logical_line):
def _common_service_clients_check(logical_line, physical_line, filename,
ignored_list_file=None):
if 'tempest/services/' not in filename:
if not re.match('tempest/(lib/)?services/.*', filename):
return False
if ignored_list_file is not None:

View File

@ -133,7 +133,9 @@ class FlavorsClient(base_compute_client.BaseComputeClient):
resp, body)
return rest_client.ResponseBody(resp, body)
def unset_flavor_extra_spec(self, flavor_id, key):
def unset_flavor_extra_spec(self, flavor_id, key): # noqa
# NOTE: This noqa is for passing T111 check and we cannot rename
# to keep backwards compatibility.
"""Unset extra Specs from the mentioned flavor."""
resp, body = self.delete('flavors/%s/os-extra_specs/%s' %
(flavor_id, key))

View File

@ -61,7 +61,11 @@ class HostsClient(base_compute_client.BaseComputeClient):
self.validate_response(schema.update_host, resp, body)
return rest_client.ResponseBody(resp, body)
def startup_host(self, hostname):
def startup_host(self, hostname): # noqa
# NOTE: This noqa is for passing T110 check and we cannot rename
# to keep backwards compatibility. Actually, the root problem
# of this is a wrong API design. GET operation should not change
# resource status, but current API does that.
"""Startup a host."""
resp, body = self.get("os-hosts/%s/startup" % hostname)
@ -69,7 +73,11 @@ class HostsClient(base_compute_client.BaseComputeClient):
self.validate_response(schema.startup_host, resp, body)
return rest_client.ResponseBody(resp, body)
def shutdown_host(self, hostname):
def shutdown_host(self, hostname): # noqa
# NOTE: This noqa is for passing T110 check and we cannot rename
# to keep backwards compatibility. Actually, the root problem
# of this is a wrong API design. GET operation should not change
# resource status, but current API does that.
"""Shutdown a host."""
resp, body = self.get("os-hosts/%s/shutdown" % hostname)
@ -77,7 +85,11 @@ class HostsClient(base_compute_client.BaseComputeClient):
self.validate_response(schema.shutdown_host, resp, body)
return rest_client.ResponseBody(resp, body)
def reboot_host(self, hostname):
def reboot_host(self, hostname): # noqa
# NOTE: This noqa is for passing T110 check and we cannot rename
# to keep backwards compatibility. Actually, the root problem
# of this is a wrong API design. GET operation should not change
# resource status, but current API does that.
"""Reboot a host."""
resp, body = self.get("os-hosts/%s/reboot" % hostname)

View File

@ -63,7 +63,9 @@ class HypervisorClient(base_compute_client.BaseComputeClient):
self.validate_response(schema.get_hypervisor_uptime, resp, body)
return rest_client.ResponseBody(resp, body)
def search_hypervisor(self, hypervisor_name):
def search_hypervisor(self, hypervisor_name): # noqa
# NOTE: This noqa is for passing T110 check and we cannot rename
# to keep backwards compatibility.
"""Search specified hypervisor."""
resp, body = self.get('os-hypervisors/%s/search' % hypervisor_name)
body = json.loads(body)

View File

@ -22,7 +22,9 @@ class QuotasClient(base.BaseNetworkClient):
uri = '/quotas/%s' % tenant_id
return self.update_resource(uri, put_body)
def reset_quotas(self, tenant_id):
def reset_quotas(self, tenant_id): # noqa
# NOTE: This noqa is for passing T111 check and we cannot rename
# to keep backwards compatibility.
uri = '/quotas/%s' % tenant_id
return self.delete_resource(uri)