summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py4
-rw-r--r--yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py4
2 files changed, 5 insertions, 3 deletions
diff --git a/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py b/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py
index 6645d45fe..d41dd028f 100644
--- a/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py
+++ b/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py
@@ -1038,7 +1038,7 @@ class IxNextgen(object): # pragma: no cover
return obj
- def add_static_ipv4(self, iface, vport, start_ip, count):
+ def add_static_ipv4(self, iface, vport, start_ip, count, mask='24'):
"""Add static IP range to the interface"""
log.debug("add_static_ipv4: start_ip:'%s', count:'%s'",
start_ip, count)
@@ -1046,5 +1046,5 @@ class IxNextgen(object): # pragma: no cover
self.ixnet.setMultiAttribute(obj, '-protocolInterface', iface,
'-ipStart', start_ip, '-count', count,
- '-enabled', 'true')
+ '-mask', mask, '-enabled', 'true')
self.ixnet.commit()
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 c1d902061..5b32a4297 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
@@ -373,13 +373,15 @@ class TestIxNextgen(unittest.TestCase):
self.ixnet_gen.add_static_ipv4(iface='iface',
vport='vport',
start_ip='10.0.0.0',
- count='100')
+ count='100',
+ mask='32')
self.ixnet_gen.ixnet.add.assert_called_once_with(
'vport/protocols/static', 'ip')
self.ixnet_gen.ixnet.setMultiAttribute.assert_any_call(
'obj', '-protocolInterface', 'iface',
'-ipStart', '10.0.0.0',
'-count', '100',
+ '-mask', '32',
'-enabled', 'true')
@mock.patch.object(IxNetwork, 'IxNet')