fix bug 654. First vdu's placement-groups does not work 69/7369/1
authortierno <alfonso.tiernosepulveda@telefonica.com>
Fri, 29 Mar 2019 08:50:12 +0000 (08:50 +0000)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Fri, 29 Mar 2019 08:52:15 +0000 (08:52 +0000)
Change-Id: Idc935fa13ab6b8e138472de4ebc932810a5e9c5b
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
osm_ro/nfvo.py

index 281b8f9..f65f08f 100644 (file)
@@ -1291,8 +1291,7 @@ def new_vnfd_v3(mydb, tenant_id, vnf_descriptor):
                                             "'member-vdus':'{vdu}'. Reference to a non-existing vdu".format(
                                                 vnf=vnfd_id, pg=pg_name, vdu=vdu_id),
                                             httperrors.Bad_Request)
-                    if vdu_id2db_table_index[vdu_id]:
-                        db_vms[vdu_id2db_table_index[vdu_id]]["availability_zone"] = pg_name
+                    db_vms[vdu_id2db_table_index[vdu_id]]["availability_zone"] = pg_name
                     # TODO consider the case of isolation and not colocation
                     # if pg.get("strategy") == "ISOLATION":