aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py
diff options
context:
space:
mode:
authorOleksandr Naumets <oleksandrx.naumets@intel.com>2018-10-05 15:58:30 +0100
committerOleksandr Naumets <oleksandrx.naumets@intel.com>2018-10-10 09:30:47 +0000
commit2f3b65755d896fc9b7a7b248ba4de550696b1a6e (patch)
tree25011e19597437477cef87e32c242bd239febaac /yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py
parent81ed5cdea4c36d45c6463523c6a0bc38495e544a (diff)
Add IxNextgen API for creating BGP protocol layer
Added functionality to create BGP protocol layer for device group JIRA: YARDSTICK-1465 Change-Id: Ib18b979ce09589b5eda438f01f4f8845295e4c71 Signed-off-by: Oleksandr Naumets <oleksandrx.naumets@intel.com>
Diffstat (limited to 'yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py')
-rw-r--r--yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py b/yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py
index 01ed4e34e..dd66f5fd0 100644
--- a/yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py
+++ b/yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py
@@ -334,6 +334,21 @@ class TestIxNextgen(unittest.TestCase):
self.ixnet_gen.ixnet.setMultiAttribute.assert_not_called()
+ def test_add_bgp(self):
+ self.ixnet_gen.ixnet.add.return_value = 'obj'
+ self.ixnet_gen.ixnet.getAttribute.return_value = 'attr'
+ self.ixnet_gen.add_bgp(ipv4='ipv4 1',
+ dut_ip='10.0.0.1',
+ local_as=65000,
+ bgp_type='external')
+ self.ixnet_gen.ixnet.add.assert_called_once_with('ipv4 1', 'bgpIpv4Peer')
+ self.ixnet_gen.ixnet.setAttribute.assert_any_call(
+ 'attr/singleValue', '-value', '10.0.0.1')
+ self.ixnet_gen.ixnet.setAttribute.assert_any_call(
+ 'attr/singleValue', '-value', 65000)
+ self.ixnet_gen.ixnet.setAttribute.assert_any_call(
+ 'attr/singleValue', '-value', 'external')
+
@mock.patch.object(IxNetwork, 'IxNet')
def test_connect(self, mock_ixnet):
mock_ixnet.return_value = self.ixnet