Update from master
[osm/devops.git] / installers / charm / osm-lcm / lib / charms / osm_libs / v0 / utils.py
index d739ba6..02d46db 100644 (file)
@@ -235,12 +235,14 @@ wait
 @dataclass
 class SubModule:
     """Represent RO Submodules."""
+
     sub_module_path: str
     container_path: str
 
 
 class HostPath:
     """Represents a hostpath."""
+
     def __init__(self, config: str, container_path: str, submodules: dict = None) -> None:
         mount_path_items = config.split("-")
         mount_path_items.reverse()
@@ -250,13 +252,18 @@ class HostPath:
         if submodules:
             for submodule in submodules.keys():
                 self.sub_module_dict[submodule] = SubModule(
-                    sub_module_path=self.mount_path + "/" + submodule + "/" + submodules[submodule].split("/")[-1],
+                    sub_module_path=self.mount_path
+                    + "/"
+                    + submodule
+                    + "/"
+                    + submodules[submodule].split("/")[-1],
                     container_path=submodules[submodule],
                 )
         else:
             self.container_path = container_path
             self.module_name = container_path.split("/")[-1]
 
+
 class DebugMode(Object):
     """Class to handle the debug-mode."""
 
@@ -432,7 +439,9 @@ class DebugMode(Object):
             logger.debug(f"adding symlink for {hostpath.config}")
             if len(hostpath.sub_module_dict) > 0:
                 for sub_module in hostpath.sub_module_dict.keys():
-                    self.container.exec(["rm", "-rf", hostpath.sub_module_dict[sub_module].container_path]).wait_output()
+                    self.container.exec(
+                        ["rm", "-rf", hostpath.sub_module_dict[sub_module].container_path]
+                    ).wait_output()
                     self.container.exec(
                         [
                             "ln",
@@ -506,7 +515,6 @@ class DebugMode(Object):
     def _delete_hostpath_from_statefulset(self, hostpath: HostPath, statefulset: StatefulSet):
         hostpath_unmounted = False
         for volume in statefulset.spec.template.spec.volumes:
-
             if hostpath.config != volume.name:
                 continue