From a43bd9eccf7ce23220a928273e1b16341eeb26b9 Mon Sep 17 00:00:00 2001 From: tierno Date: Mon, 26 Nov 2018 09:28:58 +0000 Subject: [PATCH] (bug 589) add proper filtering VDU by instance-id on scalling Change-Id: Iaf4c38d6907a4af5124c85d94518004851b5f6c5 Signed-off-by: tierno --- openmanod | 2 +- osm_ro/nfvo.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/openmanod b/openmanod index 32c60ee3..8dcb0f39 100755 --- a/openmanod +++ b/openmanod @@ -48,7 +48,7 @@ import osm_ro __author__ = "Alfonso Tierno, Gerardo Garcia, Pablo Montes" __date__ = "$26-aug-2014 11:09:29$" -__version__ = "0.5.82-r592" +__version__ = "0.5.83-r593" version_date = "Nov 2018" database_version = 33 # expected database schema version diff --git a/osm_ro/nfvo.py b/osm_ro/nfvo.py index f8aa47ed..01ac0175 100644 --- a/osm_ro/nfvo.py +++ b/osm_ro/nfvo.py @@ -4374,13 +4374,14 @@ def instance_action(mydb,nfvo_tenant,instance_id, action_dict): raise NfvoException("Cannot find the vdu with id {}".format(vdu_id), HTTP_Not_Found) else: if not osm_vdu_id and not member_vnf_index: - raise NfvoException("Invalid imput vdu parameters. Must supply either 'vdu-id' of 'osm_vdu_id','member-vnf-index'") + raise NfvoException("Invalid input vdu parameters. Must supply either 'vdu-id' of 'osm_vdu_id','member-vnf-index'") target_vms = mydb.get_rows( # SELECT=("ivms.uuid", "ivnfs.datacenter_id", "ivnfs.datacenter_tenant_id"), FROM="instance_vms as ivms join instance_vnfs as ivnfs on ivms.instance_vnf_id=ivnfs.uuid"\ " join sce_vnfs as svnfs on ivnfs.sce_vnf_id=svnfs.uuid"\ " join vms on ivms.vm_id=vms.uuid", - WHERE={"vms.osm_id": osm_vdu_id, "svnfs.member_vnf_index": member_vnf_index}, + WHERE={"vms.osm_id": osm_vdu_id, "svnfs.member_vnf_index": member_vnf_index, + "ivnfs.instance_scenario_id": instance_id}, ORDER_BY="ivms.created_at" ) if not target_vms: -- 2.25.1