[CVP] Refactor salt client class
Change-Id: I91cfffe1c8d5df0224657ce9e36be9063b56f0b3
Related-PROD: PROD-28981
Related-PROD: PROD-28729
Related-PROD: PROD-28624
Related-PROD: PROD-29286
diff --git a/test_set/cvp-sanity/tests/test_mounts.py b/test_set/cvp-sanity/tests/test_mounts.py
index 3b5b697..6fcca56 100644
--- a/test_set/cvp-sanity/tests/test_mounts.py
+++ b/test_set/cvp-sanity/tests/test_mounts.py
@@ -7,21 +7,20 @@
# Get all mount points from each node in the group with the next command: `df -h | awk '{print $1}'`
# Check that all mount points are similar for each node in the group
"""
- mounts_by_nodes = local_salt_client.cmd("L@"+','.join(nodes_in_group),
- 'cmd.run',
- ["df -h | awk '{print $1}'"],
+ mounts_by_nodes = local_salt_client.cmd(tgt="L@"+','.join(nodes_in_group),
+ param="df -h | awk '{print $1}'",
expr_form='compound')
# Let's exclude cmp, kvm, ceph OSD nodes, mon, cid, k8s-ctl, k8s-cmp nodes
# These nodes will have different mounts and this is expected
- exclude_nodes = local_salt_client.cmd(
- ("I@nova:compute or "
- "I@ceph:osd or "
- "I@salt:control or "
- "I@prometheus:server and not I@influxdb:server or "
- "I@kubernetes:* and not I@etcd:* or "
- "I@docker:host and not I@prometheus:server and not I@kubernetes:*"),
- 'test.ping', expr_form='compound').keys()
+ exclude_nodes = local_salt_client.test_ping(
+ tgt="I@nova:compute or "
+ "I@ceph:osd or "
+ "I@salt:control or "
+ "I@prometheus:server and not I@influxdb:server or "
+ "I@kubernetes:* and not I@etcd:* or "
+ "I@docker:host and not I@prometheus:server and not I@kubernetes:*",
+ expr_form='compound').keys()
if len(mounts_by_nodes.keys()) < 2:
pytest.skip("Nothing to compare - only 1 node")