Reformat files according to new black validation
[osm/LCM.git] / osm_lcm / vim_sdn.py
index 0eeb681..ea25c2b 100644 (file)
@@ -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.
@@ -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.