Add LCM configuration options for workflow debug and dry_run 96/14896/2
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Mon, 27 Jan 2025 10:16:27 +0000 (11:16 +0100)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Mon, 27 Jan 2025 10:30:18 +0000 (11:30 +0100)
Change-Id: Ib4bd1cb66c8e649484455298796221925f1f80d7
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
osm_lcm/data_utils/lcm_config.py
osm_lcm/lcm.cfg
osm_lcm/odu_workflows.py

index b88c55d..224b4a4 100644 (file)
@@ -211,6 +211,8 @@ class GitopsConfig(OsmConfigman):
     user: str = None
     pubkey: str = None
     mgmtcluster_kubeconfig: str = None
+    workflow_debug: bool = True
+    workflow_dry_run: bool = False
     loglevel: str = "DEBUG"
     logfile: str = None
     logger_name: str = None
index b77e33c..212c395 100644 (file)
@@ -96,4 +96,6 @@ gitops:
     user:              osm-developer
     # git_base_url:          http://git.<IP_ADDRESS>.nip.io
     # pubkey:                 pubkey
+    workflow_debug: true
+    workflow_dry_run: false
 
index 7ac431f..6e9061e 100644 (file)
@@ -41,8 +41,8 @@ class OduWorkflow(LcmBase):
         self._repo_base_url = self.gitops_config["git_base_url"]
         self._repo_user = self.gitops_config["user"]
         self._pubkey = self.gitops_config["pubkey"]
-        self._workflow_debug = "true"
-        self._workflow_dry_run = "false"
+        self._workflow_debug = str(self.gitops_config["workflow_debug"]).lower()
+        self._workflow_dry_run = str(self.gitops_config["workflow_dry_run"]).lower()
         self._workflows = {
             "create_cluster": {
                 "workflow_function": self.create_cluster,