Migrate cvp-sanity to Python3
* use print function from future
* convert dict keys and values to list
* do not use bunch imports
* fix requirements mismatch
Related: PROD-33849
Change-Id: Ifecc3a9dcdcfe3243f7dcf2c709a80e9a7c765a1
diff --git a/test_set/cvp-sanity/tests/test_kernel_settings.py b/test_set/cvp-sanity/tests/test_kernel_settings.py
index f13f685..302c8a3 100644
--- a/test_set/cvp-sanity/tests/test_kernel_settings.py
+++ b/test_set/cvp-sanity/tests/test_kernel_settings.py
@@ -42,11 +42,11 @@
# To get only specified values from system need to request them in the nex format
# 'sysctl param1 param2 param3 param4'
- for node in expected_kernel_params_by_nodes.keys():
+ for node in list(expected_kernel_params_by_nodes.keys()):
actual_kernel_params_for_node = local_salt_client.cmd(
tgt=node,
fun='cmd.run',
- param="sysctl {}".format(" ".join(expected_kernel_params_by_nodes[node].keys())),
+ param="sysctl {}".format(" ".join(list(expected_kernel_params_by_nodes[node].keys()))),
expr_form='compound'
)
# make transfer string to dict format
@@ -62,7 +62,7 @@
for param in actual_kernel_params_for_node[node].split('\n')}
differences = [ "Parameter '{}' is not set === Expected '{}' === Got in sysctl '{}'".format(key, expected_kernel_params_by_nodes[node].get(key), actual)
- for key, actual in values.items()
+ for key, actual in list(values.items())
if expected_kernel_params_by_nodes[node].get(key) != actual ]
if differences.__len__() > 0:
issues[node] = differences