cfg-checker ceph bench debug part 3
- cleanup procedure
- agent json loading updates
- bool argument detection updates
Related-PROD: PROD-36669
Change-Id: I9e2417a2bfc03883d9a6ef69f60f000cb5bacf54
diff --git a/cfg_checker/nodes.py b/cfg_checker/nodes.py
index c1b3d4c..49284ca 100644
--- a/cfg_checker/nodes.py
+++ b/cfg_checker/nodes.py
@@ -1357,3 +1357,21 @@
self.kube.wait_for_phase(res_type, name, None, ["Terminated"])
return True
+
+ def get_resource_phase_by_name(self, typ, name, ns="qa-space"):
+ if typ == "pod":
+ _t = self.kube.get_pod_by_name_and_ns(name, ns)
+ elif typ == "svc":
+ _t = self.kube.get_svc_by_name_and_ns(name, ns)
+ elif typ == "pvc":
+ _t = self.kube.get_pvc_by_name_and_ns(name, ns)
+ elif typ == "pv":
+ _t = self.kube.get_pv_by_name(name)
+ else:
+ logger_cli.error("ERROR: '{}' is not supported yet".format(typ))
+ return None
+
+ if _t:
+ return _t.status.phase
+ else:
+ return None