aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-07-12 15:06:55 +0100
committerRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-07-12 15:08:54 +0100
commit639287faab56f702806d5bff09e38788d165ac9b (patch)
treee1eb1188e781b8051c54ebe761235038ef706523
parent5e531e1e38da7670a1226aec4c664ef96a77335e (diff)
Fix "id" retrieval from MQ producer in GenericTrafficGen
"GenericTrafficGen.get_mq_producer_id" uses a wrong method to retrieve the MQ producer ID. "MessagingProducer" ID is a property called "id". JIRA: YARDSTICK-1312 Change-Id: Id72836b1cde59059359907bd3a315a1abb55778e Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
-rw-r--r--yardstick/network_services/vnf_generic/vnf/base.py2
-rw-r--r--yardstick/tests/unit/network_services/vnf_generic/vnf/test_base.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/yardstick/network_services/vnf_generic/vnf/base.py b/yardstick/network_services/vnf_generic/vnf/base.py
index fb41a4e4a..45a6160c2 100644
--- a/yardstick/network_services/vnf_generic/vnf/base.py
+++ b/yardstick/network_services/vnf_generic/vnf/base.py
@@ -335,4 +335,4 @@ class GenericTrafficGen(GenericVNF):
def get_mq_producer_id(self):
"""Return the MQ producer ID if initialized"""
if self._mq_producer:
- return self._mq_producer.get_id()
+ return self._mq_producer.id
diff --git a/yardstick/tests/unit/network_services/vnf_generic/vnf/test_base.py b/yardstick/tests/unit/network_services/vnf_generic/vnf/test_base.py
index 43e5ac839..ce8205a47 100644
--- a/yardstick/tests/unit/network_services/vnf_generic/vnf/test_base.py
+++ b/yardstick/tests/unit/network_services/vnf_generic/vnf/test_base.py
@@ -264,7 +264,7 @@ class GenericTrafficGenTestCase(unittest.TestCase):
}
tg = _DummyGenericTrafficGen('name', vnfd)
tg._mq_producer = mock.Mock()
- tg._mq_producer.get_id.return_value = 'fake_id'
+ tg._mq_producer.id = 'fake_id'
self.assertEqual('fake_id', tg.get_mq_producer_id())