diff --git a/tempest/hacking/checks.py b/tempest/hacking/checks.py index f4b76e5e9e..d1bc141823 100644 --- a/tempest/hacking/checks.py +++ b/tempest/hacking/checks.py @@ -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: diff --git a/tempest/lib/services/compute/flavors_client.py b/tempest/lib/services/compute/flavors_client.py index 6869f02017..e377c8448c 100644 --- a/tempest/lib/services/compute/flavors_client.py +++ b/tempest/lib/services/compute/flavors_client.py @@ -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)) diff --git a/tempest/lib/services/compute/hosts_client.py b/tempest/lib/services/compute/hosts_client.py index 01437651a3..16b5edda67 100644 --- a/tempest/lib/services/compute/hosts_client.py +++ b/tempest/lib/services/compute/hosts_client.py @@ -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) diff --git a/tempest/lib/services/compute/hypervisor_client.py b/tempest/lib/services/compute/hypervisor_client.py index 5dcecc9920..23c304e836 100644 --- a/tempest/lib/services/compute/hypervisor_client.py +++ b/tempest/lib/services/compute/hypervisor_client.py @@ -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) diff --git a/tempest/lib/services/network/quotas_client.py b/tempest/lib/services/network/quotas_client.py index b5cf35b95d..752b253f46 100644 --- a/tempest/lib/services/network/quotas_client.py +++ b/tempest/lib/services/network/quotas_client.py @@ -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)