From: schillinge Date: Thu, 21 Mar 2019 21:27:04 +0000 (+0100) Subject: Removed double assignments of variables X-Git-Tag: v6.0.0~31 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F53%2F7353%2F2;p=osm%2FRO.git Removed double assignments of variables These arrays are already assigned earlier, reassigning them to [] deletes previously added entries, disallowing VNFFGs consisting of multiple RSPs, Classifiers, ... Change-Id: Ifda49f7d8528e0e888569745261aa97772c075b8 Signed-off-by: schillinge --- diff --git a/osm_ro/nfvo.py b/osm_ro/nfvo.py index 1efd144c..f6cb8479 100644 --- a/osm_ro/nfvo.py +++ b/osm_ro/nfvo.py @@ -2440,7 +2440,6 @@ def new_nsd_v3(mydb, tenant_id, nsd_descriptor): db_sce_vnffgs.append(db_sce_vnffg) # deal with rsps - db_sce_rsps = [] for rsp in vnffg.get("rsp").itervalues(): sce_rsp_uuid = str(uuid4()) uuid_list.append(sce_rsp_uuid) @@ -2451,7 +2450,6 @@ def new_nsd_v3(mydb, tenant_id, nsd_descriptor): "id": get_str(rsp, "id", 255), # only useful to link with classifiers; will be removed later in the code } db_sce_rsps.append(db_sce_rsp) - db_sce_rsp_hops = [] for iface in rsp.get("vnfd-connection-point-ref").itervalues(): vnf_index = str(iface['member-vnf-index-ref']) if_order = int(iface['order']) @@ -2504,7 +2502,6 @@ def new_nsd_v3(mydb, tenant_id, nsd_descriptor): db_sce_rsp_hops.append(db_sce_rsp_hop) # deal with classifiers - db_sce_classifiers = [] for classifier in vnffg.get("classifier").itervalues(): sce_classifier_uuid = str(uuid4()) uuid_list.append(sce_classifier_uuid) @@ -2543,7 +2540,6 @@ def new_nsd_v3(mydb, tenant_id, nsd_descriptor): db_sce_classifier["sce_rsp_id"] = rsp["uuid"] db_sce_classifiers.append(db_sce_classifier) - db_sce_classifier_matches = [] for match in classifier.get("match-attributes").itervalues(): sce_classifier_match_uuid = str(uuid4()) uuid_list.append(sce_classifier_match_uuid)