X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_ro%2Fnfvo.py;h=f65f08f9f5ffe5f77e5513199c40bf3c56d36ae0;hb=55fe3970aa7fb2dad4d5d13409fdd3efcd65bec2;hp=f6cb847905e082fb69030ed6d3e749ab673120b1;hpb=264c0cf3aea0dc1a0d539c5f535cde562cd47b16;p=osm%2FRO.git diff --git a/osm_ro/nfvo.py b/osm_ro/nfvo.py index f6cb8479..f65f08f9 100644 --- a/osm_ro/nfvo.py +++ b/osm_ro/nfvo.py @@ -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": @@ -3588,12 +3587,14 @@ def create_instance(mydb, tenant_id, instance_dict): returned_instance = mydb.get_instance_scenario(instance_uuid) returned_instance["action_id"] = instance_action_id return returned_instance - except (NfvoException, vimconn.vimconnException, db_base_Exception) as e: + except (NfvoException, vimconn.vimconnException, wimconn.WimConnectorError, db_base_Exception) as e: message = rollback(mydb, myvims, rollbackList) if isinstance(e, db_base_Exception): error_text = "database Exception" elif isinstance(e, vimconn.vimconnException): error_text = "VIM Exception" + elif isinstance(e, wimconn.WimConnectorError): + error_text = "WIM Exception" else: error_text = "Exception" error_text += " {} {}. {}".format(type(e).__name__, str(e), message)