X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_ro%2Fnfvo.py;h=19c8b7d3bd2719219d0d664ff43a46b4cb8693a0;hb=refs%2Fchanges%2F44%2F7044%2F2;hp=f625b4f6fb0f04cfb44080c1320e7a5adbf81101;hpb=c5293def02d95ed4ee086dd8842437b76ec05c4e;p=osm%2FRO.git diff --git a/osm_ro/nfvo.py b/osm_ro/nfvo.py index f625b4f6..19c8b7d3 100644 --- a/osm_ro/nfvo.py +++ b/osm_ro/nfvo.py @@ -4507,7 +4507,7 @@ def instance_action(mydb,nfvo_tenant,instance_id, action_dict): iface2iface = {} where = {"item": "instance_vms", "item_id": target_vm["uuid"], "action": "CREATE"} - vim_action_to_clone = mydb.get_rows(FROM="vim_actions", WHERE=where) + vim_action_to_clone = mydb.get_rows(FROM="vim_wim_actions", WHERE=where) if not vim_action_to_clone: raise NfvoException("Cannot find the vim_action at database with {}".format(where), httperrors.Internal_Server_Error) vim_action_to_clone = vim_action_to_clone[0] @@ -4605,7 +4605,7 @@ def instance_action(mydb,nfvo_tenant,instance_id, action_dict): # {"instance_sfs": db_instance_sfs}, # {"instance_classifications": db_instance_classifications}, # {"instance_sfps": db_instance_sfps}, - {"vim_actions": db_vim_actions} + {"vim_wim_actions": db_vim_actions} ] logger.debug("create_vdu done DB tables: %s", yaml.safe_dump(db_tables, indent=4, default_flow_style=False)) @@ -4711,6 +4711,8 @@ def instance_action_get(mydb, nfvo_tenant, instance_id, action_id): raise NfvoException("Not found any action with this criteria", httperrors.Not_Found) vim_wim_actions = mydb.get_rows(FROM="vim_wim_actions", WHERE={"instance_action_id": action_id}) rows[0]["vim_wim_actions"] = vim_wim_actions + # for backward compatibility set vim_actions = vim_wim_actions + rows[0]["vim_actions"] = vim_wim_actions return {"actions": rows}