From: tierno Date: Wed, 22 May 2019 16:45:09 +0000 (+0000) Subject: bug 687 fixing related when scaling X-Git-Tag: v6.0.0~12 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=b5091bd290e9a6d6af15c363a3a1f230b3655ff0;p=osm%2FRO.git bug 687 fixing related when scaling Change-Id: I73d7fb77a55aa56691bf1507d9d99b32679adc4f Signed-off-by: tierno --- diff --git a/osm_ro/nfvo.py b/osm_ro/nfvo.py index 414f3652..b0a6a648 100644 --- a/osm_ro/nfvo.py +++ b/osm_ro/nfvo.py @@ -4616,6 +4616,7 @@ def instance_action(mydb,nfvo_tenant,instance_id, action_dict): for sce_vnf in instanceDict['vnfs']: for vm in sce_vnf['vms']: if vm["uuid"] == vdu_id: + # TODO revise this should not be vm["uuid"] instance_vms["vm_id"] vm_interfaces = vm["interfaces"] break @@ -4627,7 +4628,7 @@ def instance_action(mydb,nfvo_tenant,instance_id, action_dict): "status": "SCHEDULED", "item": "instance_vms", "item_id": vdu_id, - "related": vm["related"], + "related": target_vm["related"], "extra": yaml.safe_dump({"params": vm_interfaces}, default_flow_style=True, width=256) } @@ -4675,9 +4676,10 @@ def instance_action(mydb,nfvo_tenant,instance_id, action_dict): pass db_instance_vm = { "uuid": vm_uuid, + 'related': vm_uuid, 'instance_vnf_id': target_vm['instance_vnf_id'], 'vm_id': target_vm['vm_id'], - 'vim_name': vm_name + 'vim_name': vm_name, } db_instance_vms.append(db_instance_vm) @@ -4718,7 +4720,7 @@ def instance_action(mydb,nfvo_tenant,instance_id, action_dict): "status": "SCHEDULED", "item": "instance_vms", "item_id": vm_uuid, - "related": target_vm["related"], + "related": vm_uuid, # ALF # ALF # TODO examinar parametros, quitar MAC o incrementar. Incrementar IP y colocar las dependencias con ACTION-asdfasd.