Bug 1980 fixed
[osm/N2VC.git] / n2vc / k8s_helm3_conn.py
index 8bfd173..bb08f07 100644 (file)
@@ -19,6 +19,7 @@
 # For those usages not covered by the Apache License, Version 2.0 please
 # contact with: nfvlabs@tid.es
 ##
 # 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
 
 import os
 import yaml
 
@@ -367,9 +368,9 @@ class K8sHelm3Connector(K8sHelmBaseConnector):
         cluster_id: str,
         kdu_instance: str,
         namespace: str = None,
         cluster_id: str,
         kdu_instance: str,
         namespace: str = None,
+        yaml_format: bool = False,
         show_error_log: 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)
 
         self.log.debug(
             "status of kdu_instance: {}, namespace: {} ".format(kdu_instance, namespace)
@@ -393,7 +394,7 @@ class K8sHelm3Connector(K8sHelmBaseConnector):
             env=env,
         )
 
             env=env,
         )
 
-        if return_text:
+        if yaml_format:
             return str(output)
 
         if rc != 0:
             return str(output)
 
         if rc != 0: