From: Benjamin Diaz Date: Wed, 3 Oct 2018 14:38:18 +0000 (-0300) Subject: Replaces vdu-id-ref for name during VDU lookup X-Git-Tag: v5.0.0~36 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=3dd2f6e81fd4997d0d1bb655534677e464072215;hp=2059631502ca96da2dccac3450fc334c023c42cb;p=osm%2FMON.git 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 --- 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)