Bug 1980 fixed
Added the `yaml_format` argument to the `status_kdu` abstract method of
the class `K8sConnector`, and changed the corresponding Helm connectors
methods accordingly, while maintaining backward compatibility
Change-Id: Ic78c951825b7654ccf8246c4fe1fc4d488221bfc
Signed-off-by: Pedro Escaleira <escaleira@av.it.pt>
diff --git a/n2vc/k8s_helm3_conn.py b/n2vc/k8s_helm3_conn.py
index 8bfd173..bb08f07 100644
--- a/n2vc/k8s_helm3_conn.py
+++ b/n2vc/k8s_helm3_conn.py
@@ -19,6 +19,7 @@
# For those usages not covered by the Apache License, Version 2.0 please
# contact with: nfvlabs@tid.es
##
+from typing import Union
import os
import yaml
@@ -367,9 +368,9 @@
cluster_id: str,
kdu_instance: str,
namespace: str = None,
+ yaml_format: bool = False,
show_error_log: bool = False,
- return_text: bool = False,
- ):
+ ) -> Union[str, dict]:
self.log.debug(
"status of kdu_instance: {}, namespace: {} ".format(kdu_instance, namespace)
@@ -393,7 +394,7 @@
env=env,
)
- if return_text:
+ if yaml_format:
return str(output)
if rc != 0: