From 3dd2f6e81fd4997d0d1bb655534677e464072215 Mon Sep 17 00:00:00 2001 From: Benjamin Diaz Date: Wed, 3 Oct 2018 11:38:18 -0300 Subject: [PATCH] Replaces vdu-id-ref for name during VDU lookup Vdus were being looked up using the vdu-id-ref param, which corresponds to the name used in the vnfd to define that vdu. That was not the intended behaviour, because that param is clearly not unique. It has been replaced with the name param, which is unique to each vdu record. Signed-off-by: Benjamin Diaz --- osm_mon/core/message_bus/common_consumer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osm_mon/core/message_bus/common_consumer.py b/osm_mon/core/message_bus/common_consumer.py index 35c2e39..95b4c0d 100755 --- a/osm_mon/core/message_bus/common_consumer.py +++ b/osm_mon/core/message_bus/common_consumer.py @@ -94,7 +94,7 @@ class CommonConsumer: def get_vdur(self, nsr_id, member_index, vdu_name): vnfr = self.get_vnfr(nsr_id, member_index) for vdur in vnfr['vdur']: - if vdur['vdu-id-ref'] == vdu_name: + if vdur['name'] == vdu_name: return vdur raise ValueError('vdur not found for nsr-id %s, member_index %s and vdu_name %s', nsr_id, member_index, vdu_name) -- 2.17.1