From 4491ba91e3e2aab34e815113e33ec77d3c49f224 Mon Sep 17 00:00:00 2001 From: tierno Date: Mon, 25 Mar 2019 15:00:02 +0000 Subject: [PATCH] capturing wim exceptions properly Change-Id: I8bb1dde991e416c30acf841d99fdaea3c788eb97 Signed-off-by: tierno --- osm_ro/nfvo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osm_ro/nfvo.py b/osm_ro/nfvo.py index f6cb8479..281b8f96 100644 --- a/osm_ro/nfvo.py +++ b/osm_ro/nfvo.py @@ -3588,12 +3588,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) -- 2.25.1