X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_lcm%2Fvim_sdn.py;h=588aba1c7e16f8cc21ce7c7a94b6b9270ca17eaf;hb=refs%2Fchanges%2F16%2F13216%2F2;hp=0eeb681c0adf42363d7df97815fc1cadab55cbfd;hpb=8bbeeb07c4be6b2396549af9ca8c389d4b888809;p=osm%2FLCM.git diff --git a/osm_lcm/vim_sdn.py b/osm_lcm/vim_sdn.py index 0eeb681..588aba1 100644 --- a/osm_lcm/vim_sdn.py +++ b/osm_lcm/vim_sdn.py @@ -61,7 +61,6 @@ class VimLcm(LcmBase): super().__init__(msg, self.logger) async def create(self, vim_content, order_id): - # HA tasks and backward compatibility: # If 'vim_content' does not include 'op_id', we a running a legacy NBI version. # In such a case, HA is not supported by NBI, 'op_id' is None, and lock_HA() will do nothing. @@ -214,7 +213,6 @@ class VimLcm(LcmBase): self.lcm_tasks.remove("vim_account", vim_id, order_id) async def edit(self, vim_content, order_id): - # HA tasks and backward compatibility: # If 'vim_content' does not include 'op_id', we a running a legacy NBI version. # In such a case, HA is not supported by NBI, and the HA check always returns True @@ -370,7 +368,6 @@ class VimLcm(LcmBase): self.lcm_tasks.remove("vim_account", vim_id, order_id) async def delete(self, vim_content, order_id): - # HA tasks and backward compatibility: # If 'vim_content' does not include 'op_id', we a running a legacy NBI version. # In such a case, HA is not supported by NBI, and the HA check always returns True @@ -483,7 +480,6 @@ class WimLcm(LcmBase): super().__init__(msg, self.logger) async def create(self, wim_content, order_id): - # HA tasks and backward compatibility: # If 'wim_content' does not include 'op_id', we a running a legacy NBI version. # In such a case, HA is not supported by NBI, 'op_id' is None, and lock_HA() will do nothing. @@ -600,7 +596,6 @@ class WimLcm(LcmBase): self.lcm_tasks.remove("wim_account", wim_id, order_id) async def edit(self, wim_content, order_id): - # HA tasks and backward compatibility: # If 'wim_content' does not include 'op_id', we a running a legacy NBI version. # In such a case, HA is not supported by NBI, and the HA check always returns True @@ -628,7 +623,6 @@ class WimLcm(LcmBase): and db_wim["_admin"].get("deployed") and db_wim["_admin"]["deployed"].get("RO") ): - RO_wim_id = db_wim["_admin"]["deployed"]["RO"] step = "Editing wim at RO" RO = ROclient.ROClient(self.loop, **self.ro_config) @@ -721,7 +715,6 @@ class WimLcm(LcmBase): self.lcm_tasks.remove("wim_account", wim_id, order_id) async def delete(self, wim_content, order_id): - # HA tasks and backward compatibility: # If 'vim_content' does not include 'op_id', we a running a legacy NBI version. # In such a case, HA is not supported by NBI, and the HA check always returns True @@ -831,7 +824,6 @@ class SdnLcm(LcmBase): super().__init__(msg, self.logger) async def create(self, sdn_content, order_id): - # HA tasks and backward compatibility: # If 'sdn_content' does not include 'op_id', we a running a legacy NBI version. # In such a case, HA is not supported by NBI, 'op_id' is None, and lock_HA() will do nothing. @@ -912,7 +904,6 @@ class SdnLcm(LcmBase): self.lcm_tasks.remove("sdn", sdn_id, order_id) async def edit(self, sdn_content, order_id): - # HA tasks and backward compatibility: # If 'sdn_content' does not include 'op_id', we a running a legacy NBI version. # In such a case, HA is not supported by NBI, and the HA check always returns True @@ -994,7 +985,6 @@ class SdnLcm(LcmBase): self.lcm_tasks.remove("sdn", sdn_id, order_id) async def delete(self, sdn_content, order_id): - # HA tasks and backward compatibility: # If 'vim_content' does not include 'op_id', we a running a legacy NBI version. # In such a case, HA is not supported by NBI, and the HA check always returns True @@ -1127,7 +1117,6 @@ class K8sClusterLcm(LcmBase): } async def create(self, k8scluster_content, order_id): - op_id = k8scluster_content.pop("op_id", None) if not self.lcm_tasks.lock_HA("k8scluster", "create", op_id): return @@ -1300,12 +1289,12 @@ class K8sClusterLcm(LcmBase): self.lcm_tasks.remove("k8scluster", k8scluster_id, order_id) async def edit(self, k8scluster_content, order_id): - op_id = k8scluster_content.pop("op_id", None) if not self.lcm_tasks.lock_HA("k8scluster", "edit", op_id): return k8scluster_id = k8scluster_content["_id"] + logging_text = "Task k8scluster_edit={} ".format(k8scluster_id) self.logger.debug(logging_text + "Enter") @@ -1326,7 +1315,6 @@ class K8sClusterLcm(LcmBase): self.lcm_tasks.remove("k8scluster", k8scluster_id, order_id) async def delete(self, k8scluster_content, order_id): - # HA tasks and backward compatibility: # If 'vim_content' does not include 'op_id', we a running a legacy NBI version. # In such a case, HA is not supported by NBI, 'op_id' is None, and lock_HA() will do nothing. @@ -1378,7 +1366,7 @@ class K8sClusterLcm(LcmBase): db_k8scluster_update["_admin.helm-chart.operationalState"] = "DISABLED" if k8s_h3c_id: - step = "Removing helm-chart-v3 '{}'".format(k8s_hc_id) + step = "Removing helm-chart-v3 '{}'".format(k8s_h3c_id) uninstall_sw = ( deep_get(db_k8scluster, ("_admin", "helm-chart-v3", "created")) or False @@ -1645,7 +1633,6 @@ class VcaLcm(LcmBase): self.lcm_tasks.remove("vca", vca_id, order_id) async def delete(self, vca_content, order_id): - # HA tasks and backward compatibility: # If "vim_content" does not include "op_id", we a running a legacy NBI version. # In such a case, HA is not supported by NBI, "op_id" is None, and lock_HA() will do nothing. @@ -1724,7 +1711,6 @@ class K8sRepoLcm(LcmBase): ) async def create(self, k8srepo_content, order_id): - # HA tasks and backward compatibility: # If 'vim_content' does not include 'op_id', we a running a legacy NBI version. # In such a case, HA is not supported by NBI, 'op_id' is None, and lock_HA() will do nothing. @@ -1789,7 +1775,6 @@ class K8sRepoLcm(LcmBase): self.lcm_tasks.remove("k8srepo", k8srepo_id, order_id) async def delete(self, k8srepo_content, order_id): - # HA tasks and backward compatibility: # If 'vim_content' does not include 'op_id', we a running a legacy NBI version. # In such a case, HA is not supported by NBI, 'op_id' is None, and lock_HA() will do nothing.