Enable black and pylint in tox.ini
[osm/POL.git] / osm_policy_module / common / lcm_client.py
index 102b0dc..c94a424 100644 (file)
@@ -133,8 +133,16 @@ class LcmClient:
         return nslcmop
 
     async def heal(
-            self, nsr_id: str, vnfinstance_id: str, vdur_name: str, vdu_id: str,
-            vnf_member_index: str, heal_type: str, day1: bool, count_index: int):
+        self,
+        nsr_id: str,
+        vnfinstance_id: str,
+        vdur_name: str,
+        vdu_id: str,
+        vnf_member_index: str,
+        heal_type: str,
+        day1: bool,
+        count_index: int,
+    ):
         """
         Sends healing action to LCM through the message bus.
 
@@ -159,8 +167,15 @@ class LcmClient:
         )
         nsr = self.db_client.get_nsr(nsr_id)
         nslcmop = self._generate_nslcmop_heal(
-            nsr_id, vnfinstance_id, vdur_name, vdu_id, vnf_member_index, heal_type, day1,
-            count_index, nsr['_admin']
+            nsr_id,
+            vnfinstance_id,
+            vdur_name,
+            vdu_id,
+            vnf_member_index,
+            heal_type,
+            day1,
+            count_index,
+            nsr["_admin"],
         )
         self.db_client.create_nslcmop(nslcmop)
         log.debug("Sending heal action message: %s", json.dumps(nslcmop))
@@ -213,12 +228,12 @@ class LcmClient:
                             {
                                 "run-day1": day1,
                                 "count-index": count_index,
-                                "vdu-id": vdu_id
+                                "vdu-id": vdu_id,
                             }
-                        ]
-                    }
+                        ],
+                    },
                 }
-            ]
+            ],
         }
 
         nslcmop = {
@@ -239,8 +254,8 @@ class LcmClient:
                 "nsInstance": "/osm/nslcm/v1/ns_instances/" + nsr_id,
             },
             "_admin": {
-                "projects_read": admin['projects_read'],
-                "projects_write": admin['projects_write']
-            }
+                "projects_read": admin["projects_read"],
+                "projects_write": admin["projects_write"],
+            },
         }
         return nslcmop