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>
# remove field 'notes' and manifest
try:
del data.get("info")["notes"]
- del data["manifest"]
except KeyError:
pass
- # unable to parse 'resources' as currently it is not included in helm3
+ # 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)
+
return data
def _get_install_command(
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"))