Bug 1965 fixed
Parsed the manifest returned by the `helm status` command (in the
`_status_kdu` method) from a raw string to a list of dictionaries (each
entry in the list corresponds to each manifest's document).
Change-Id: I791c8fd59fee8ac67bcbd640a100bf63d572efcf
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
diff --git a/n2vc/k8s_helm_conn.py b/n2vc/k8s_helm_conn.py
index b11ddd0..444f2da 100644
--- a/n2vc/k8s_helm_conn.py
+++ b/n2vc/k8s_helm_conn.py
@@ -500,6 +500,15 @@
except KeyError:
pass
+ # parse the manifest to a list of dictionaries
+ if "manifest" in data:
+ manifest_str = data.get("manifest")
+ manifest_docs = yaml.load_all(manifest_str, Loader=yaml.SafeLoader)
+
+ data["manifest"] = []
+ for doc in manifest_docs:
+ data["manifest"].append(doc)
+
# parse field 'resources'
try:
resources = str(data.get("info").get("status").get("resources"))