Removed double assignments of variables 53/7353/2
authorschillinge <ablu@mail.uni-paderborn.de>
Thu, 21 Mar 2019 21:27:04 +0000 (22:27 +0100)
committerschillinge <ablu@mail.uni-paderborn.de>
Mon, 25 Mar 2019 10:26:55 +0000 (11:26 +0100)
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 <ablu@mail.uni-paderborn.de>
osm_ro/nfvo.py

index 1efd144..f6cb847 100644 (file)
@@ -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)