Enable black and pylint in tox.ini
Change-Id: I1571ce8b1a32aa67be1ada2864233c6f5ce9616b
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/osm_policy_module/common/lcm_client.py b/osm_policy_module/common/lcm_client.py
index 102b0dc..c94a424 100644
--- a/osm_policy_module/common/lcm_client.py
+++ b/osm_policy_module/common/lcm_client.py
@@ -133,8 +133,16 @@
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 @@
)
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 @@
{
"run-day1": day1,
"count-index": count_index,
- "vdu-id": vdu_id
+ "vdu-id": vdu_id,
}
- ]
- }
+ ],
+ },
}
- ]
+ ],
}
nslcmop = {
@@ -239,8 +254,8 @@
"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
diff --git a/osm_policy_module/common/mon_client.py b/osm_policy_module/common/mon_client.py
index b8c3779..1d498c2 100644
--- a/osm_policy_module/common/mon_client.py
+++ b/osm_policy_module/common/mon_client.py
@@ -53,7 +53,7 @@
threshold: int,
operation: str,
statistic: str = "AVERAGE",
- action: str = '',
+ action: str = "",
):
cor_id = random.randint(1, 10e7)
msg = self._build_create_alarm_payload(