Fix files after pep8 check
Related-Prod: PROD-36999
Change-Id: Ie6d952aa97545873089478339080931720569dba
diff --git a/tcp_tests/helpers/containers.py b/tcp_tests/helpers/containers.py
index 7d1306a..f7f78af 100644
--- a/tcp_tests/helpers/containers.py
+++ b/tcp_tests/helpers/containers.py
@@ -148,7 +148,7 @@
"failed: {1}.").format(self.image_name, result)
result = self.remote.execute(check_alias_cmd)
assert result['exit_code'] == 0, \
- ("Alias creation for running {} from container "
+ ("Alias creation for running {0} from container "
"failed: {1}.").format(self.image_name, result)
def setup(self):
diff --git a/tcp_tests/helpers/env_config.py b/tcp_tests/helpers/env_config.py
index b811030..ef07866 100644
--- a/tcp_tests/helpers/env_config.py
+++ b/tcp_tests/helpers/env_config.py
@@ -223,7 +223,7 @@
elif i_count > 0 and not isinstance(data[key], list):
raise TypeError(
("Key '{0}' by '{1}' keypath expected as list "
- "but '{3}' obj found").format(
+ "but '{2}' obj found").format(
key, keypath(walked_paths), type(data[key]).__name__
)
)
diff --git a/tcp_tests/managers/jenkins/client.py b/tcp_tests/managers/jenkins/client.py
index eb67074..20b070e 100644
--- a/tcp_tests/managers/jenkins/client.py
+++ b/tcp_tests/managers/jenkins/client.py
@@ -278,7 +278,7 @@
req = send_request(
'GET',
self.__client._build_url(PROGRESSIVE_CONSOLE_OUTPUT, locals()))
- return(self.__client.jenkins_request(req))
+ return (self.__client.jenkins_request(req))
@retry(max_count=12)
def get_workflow(self, name, build_id, enode=None, mode='describe'):
diff --git a/tcp_tests/managers/k8smanager.py b/tcp_tests/managers/k8smanager.py
index 5f5f4e8..c3922db 100644
--- a/tcp_tests/managers/k8smanager.py
+++ b/tcp_tests/managers/k8smanager.py
@@ -69,7 +69,7 @@
"expected one!").format(k8s_hosts)
k8s_host = k8s_hosts.pop()
assert k8s_host in k8s_proxy_ip, (
- "Kubernetes API host:{0} not found in proxies:{} "
+ "Kubernetes API host:{0} not found in proxies:{1} "
"on k8s master nodes. K8s proxies are expected on "
"nodes with K8s master").format(k8s_host, k8s_proxy_ip)
return k8s_host
diff --git a/tcp_tests/managers/openstack_manager.py b/tcp_tests/managers/openstack_manager.py
index b0232ca..07810ba 100644
--- a/tcp_tests/managers/openstack_manager.py
+++ b/tcp_tests/managers/openstack_manager.py
@@ -138,8 +138,8 @@
"-e SOURCE_FILE=keystonercv3 "
"-v /root/:/home/rally "
"-v /var/log/:/home/rally/rally_reports/ "
- "-v /etc/ssl/certs/:/etc/ssl/certs/ {2} >> image.output"
- .format(conf_name, pattern, registry))
+ "-v /etc/ssl/certs/:/etc/ssl/certs/ {1} >> image.output"
+ .format(conf_name, registry))
LOG.info("Running tempest testing on node {0} using the following "
"command:\n{1}".format(target_name, cmd))
diff --git a/tcp_tests/managers/rallymanager.py b/tcp_tests/managers/rallymanager.py
index 589e1ee..959ade0 100644
--- a/tcp_tests/managers/rallymanager.py
+++ b/tcp_tests/managers/rallymanager.py
@@ -255,7 +255,7 @@
report_prefix,
datetime.datetime.now().strftime('%Y%m%d_%H%M%S'))
else:
- report_filename = 'report_{1}'.format(
+ report_filename = 'report_{}'.format(
datetime.datetime.now().strftime('%Y%m%d_%H%M%S'))
docker_file_prefix = '/home/rally/.rally/' + report_filename
diff --git a/tcp_tests/managers/reclass_manager.py b/tcp_tests/managers/reclass_manager.py
index c7ec298..9b8a824 100644
--- a/tcp_tests/managers/reclass_manager.py
+++ b/tcp_tests/managers/reclass_manager.py
@@ -135,7 +135,6 @@
"{reclass_tools} get-key classes \
/srv/salt/reclass/classes/{path}".format(
reclass_tools=self.reclass_tools_cmd,
- value=value,
path=short_path
)):
LOG.warning("Class {} already exists in {}".format(
@@ -230,7 +229,6 @@
self.ssh.check_call(
"cat {yaml} > \
/srv/salt/reclass/classes/{path}".format(
- reclass_tools=self.reclass_tools_cmd,
yaml=tmp_file,
path=short_path
))
diff --git a/tcp_tests/tests/system/test_backup_restore.py b/tcp_tests/tests/system/test_backup_restore.py
index 47aff19..8608cfd 100644
--- a/tcp_tests/tests/system/test_backup_restore.py
+++ b/tcp_tests/tests/system/test_backup_restore.py
@@ -212,7 +212,7 @@
result = salt_actions.local(
sm, "pkg.info_installed", postgresql_pkg)['return'][0]
installed_ver = result[sm][postgresql_pkg].get('version')
- if not(installed_ver and postgresql_pkg_ver in installed_ver):
+ if not (installed_ver and postgresql_pkg_ver in installed_ver):
pkg = "{pkg},{pkg}-{ver}".format(
pkg=postgresql_pkg, ver=postgresql_pkg_ver)
salt_actions.local(sm, "pkg.install", pkg)
diff --git a/tcp_tests/tests/system/test_mcp_update.py b/tcp_tests/tests/system/test_mcp_update.py
index fba6cb6..c01c80f 100644
--- a/tcp_tests/tests/system/test_mcp_update.py
+++ b/tcp_tests/tests/system/test_mcp_update.py
@@ -297,7 +297,7 @@
job_name = 'pre-upgrade-verify'
job_parameters = {}
- if(dt.check_job_exists_on_jenkins(job_name)):
+ if (dt.check_job_exists_on_jenkins(job_name)):
LOG.info("Pre-upgrade verify job exists on Jenkins!")
job_result, job_description = dt.start_job_on_jenkins(
job_name=job_name,
diff --git a/tcp_tests/tests/system/test_offline.py b/tcp_tests/tests/system/test_offline.py
index 34c729a..0b0d6a5 100644
--- a/tcp_tests/tests/system/test_offline.py
+++ b/tcp_tests/tests/system/test_offline.py
@@ -73,9 +73,12 @@
end=admin_net[253],
net=admin_net))
underlay.check_call(node_name=cfg_node, verbose=verbose,
- cmd="maas mirantis vlan update "
- "$(maas mirantis subnets read | jq '.[] | select(.name==\"{net}\") | .vlan.fabric_id') " # noqa
- "0 dhcp_on=True primary_rack='cfg01'".format(net=admin_net))
+ cmd="maas mirantis vlan update "
+ "$(maas mirantis subnets read | jq '.[] | "
+ "select(.name==\"{net}\") | .vlan.fabric_id') " # noqa
+ "0 dhcp_on=True "
+ "primary_rack='cfg01'".format(
+ net=admin_net))
underlay.check_call(
node_name=cfg_node, verbose=verbose,