summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Pshyk <serhiyx.pshyk@intel.com>2018-10-19 09:46:05 +0100
committerAbhijit Sinha <abhijit.sinha@intel.com>2018-10-26 10:52:15 +0000
commit56b4d5de28bd8f491cea077e21811830959b6ea8 (patch)
tree8127d00d3fdba0207b64f901ab3e43814a802738
parenta4084d27de22c64ecb690369c7bed49175703adf (diff)
Fix default IPv4 mask for IxNetwork traffic config
IP mask is set depending on the IP range provided by the user in the traffic profile. In case of single IP in range, IPV4LENGTH value is used as mask should cover all address bits. JIRA: YARDSTICK-1478 Change-Id: I5ad40d1f3def52ebcda4400b708b71faf11e12ab Signed-off-by: Serhiy Pshyk <serhiyx.pshyk@intel.com>
-rw-r--r--yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py7
1 files changed, 2 insertions, 5 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 d4f75babb..87e9dbf85 100644
--- a/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py
+++ b/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py
@@ -41,9 +41,6 @@ C_VLAN = 1
ETHER_TYPE_802_1ad = '0x88a8'
-IP_VERSION_4_MASK = 24
-IP_VERSION_6_MASK = 64
-
TRAFFIC_STATUS_STARTED = 'started'
TRAFFIC_STATUS_STOPPED = 'stopped'
@@ -526,9 +523,9 @@ class IxNextgen(object): # pragma: no cover
srcseed = traffic_param['outer_l3']['srcseed']
dstseed = traffic_param['outer_l3']['dstseed']
srcmask = traffic_param['outer_l3']['srcmask'] \
- or IP_VERSION_4_MASK
+ or ipaddress.IPV4LENGTH
dstmask = traffic_param['outer_l3']['dstmask'] \
- or IP_VERSION_4_MASK
+ or ipaddress.IPV4LENGTH
if srcip:
self._update_ipv4_address(
self._get_stack_item(fg_id, PROTO_IPV4)[0],