From: garciadeblas Date: Wed, 15 Jun 2022 20:14:13 +0000 (+0200) Subject: Fix flake8 issues in ns.py X-Git-Tag: v11.0.3 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=1a20bf466dafcad7f128a2eddf80e58926a12db7;p=osm%2FLCM.git Fix flake8 issues in ns.py Change-Id: I08118aae99e4db80166b50b7e2ff9587373bb53c Signed-off-by: garciadeblas --- diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index 6b9bc89b..5ce18c87 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -538,7 +538,7 @@ class NsLcm(LcmBase): ) if not vdur: # Read the template saved in the db: - self.logger.debug(f"No vdur in the database. Using the vdur-template to scale") + self.logger.debug("No vdur in the database. Using the vdur-template to scale") vdur_template = db_vnfr.get("vdur-template") if not vdur_template: raise LcmException( @@ -547,12 +547,13 @@ class NsLcm(LcmBase): ) ) vdur = vdur_template[0] - #Delete a template from the database after using it - self.db.set_one("vnfrs", - {"_id": db_vnfr["_id"]}, - None, - pull={"vdur-template": {"_id": vdur['_id']}} - ) + # Delete a template from the database after using it + self.db.set_one( + "vnfrs", + {"_id": db_vnfr["_id"]}, + None, + pull={"vdur-template": {"_id": vdur['_id']}} + ) for count in range(vdu_count): vdur_copy = deepcopy(vdur) vdur_copy["status"] = "BUILD" @@ -586,7 +587,7 @@ class NsLcm(LcmBase): if vdu_delete: if len(db_vnfr["vdur"]) == 1: # The scale will move to 0 instances - self.logger.debug(f"Scaling to 0 !, creating the template with the last vdur") + self.logger.debug("Scaling to 0 !, creating the template with the last vdur") template_vdur = [db_vnfr["vdur"][0]] for vdu_id, vdu_count in vdu_delete.items(): if mark_delete: