X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=inline;f=osm_ro%2Fnfvo.py;h=6bb14f9fe129cf7f63f60a4f62ef903bd48639ea;hb=a6eff0a68fb60108545b81215f9551097f4bfd40;hp=c2f331be29b1f7614d6737698c89e3eb66cb89d5;hpb=45140f51dbddc7084fdedf71fd888f691b851301;p=osm%2FRO.git diff --git a/osm_ro/nfvo.py b/osm_ro/nfvo.py index c2f331be..6bb14f9f 100644 --- a/osm_ro/nfvo.py +++ b/osm_ro/nfvo.py @@ -4243,7 +4243,7 @@ def new_tenant(mydb, tenant_dict): tenant_dict['encrypted_RO_priv_key'] = priv_key mydb.new_row("nfvo_tenants", tenant_dict, confidential_data=True) except db_base_Exception as e: - raise NfvoException("Error creating the new tenant: {} ".format(tenant_dict['name']) + str(e), HTTP_Internal_Server_Error) + raise NfvoException("Error creating the new tenant: {} ".format(tenant_dict['name']) + str(e), e.http_code) return tenant_uuid def delete_tenant(mydb, tenant): @@ -4626,7 +4626,7 @@ def get_sdn_net_id(mydb, tenant_id, datacenter, network_id): result = mydb.get_rows(SELECT=('sdn_net_id',), FROM='instance_nets', WHERE=search_dict) except db_base_Exception as e: raise NfvoException("db_base_Exception obtaining SDN network to associated to vim network {}".format( - network_id) + str(e), HTTP_Internal_Server_Error) + network_id) + str(e), e.http_code) sdn_net_counter = 0 for net in result: @@ -4683,7 +4683,7 @@ def vim_net_sdn_attach(mydb, tenant_id, datacenter, network_id, descriptor): sdn_network_id, network_id) + str(e), HTTP_Internal_Server_Error) except db_base_Exception as e: raise NfvoException("db_base_Exception attaching SDN network to vim network {}".format( - network_id) + str(e), HTTP_Internal_Server_Error) + network_id) + str(e), e.http_code) return 'Port uuid: '+ result @@ -4813,7 +4813,7 @@ def vim_action_delete(mydb, tenant_id, datacenter, item, name): mydb.delete_row(FROM='instance_nets', WHERE={'instance_scenario_id': None, 'sdn_net_id': sdn_network_id, 'vim_net_id': item_id}) except db_base_Exception as e: raise NfvoException("Error deleting correspondence for VIM/SDN dataplane networks{}: ".format(correspondence) + - str(e), HTTP_Internal_Server_Error) + str(e), e.http_code) #Delete the SDN network try: @@ -4883,7 +4883,7 @@ def vim_action_create(mydb, tenant_id, datacenter, item, descriptor): mydb.new_row('instance_nets', correspondence, add_uuid=True) except db_base_Exception as e: raise NfvoException("Error saving correspondence for VIM/SDN dataplane networks{}: {}".format( - correspondence, e), HTTP_Internal_Server_Error) + correspondence, e), e.http_code) elif item=="tenants": tenant = descriptor["tenant"] content = myvim.new_tenant(tenant["name"], tenant.get("description"))