aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries
diff options
context:
space:
mode:
authorJan Gelety <jgelety@cisco.com>2019-11-29 02:10:31 +0100
committerJan Gelety <jgelety@cisco.com>2019-12-03 11:42:41 +0000
commitaf7b59381c3add4c4c200e15e306503ca544cfcd (patch)
tree23bdc26598a0bc5310ec00e8ef5bccd2f24b4a4b /resources/libraries
parent77afc12214bcb20d3e93cea290c088603af7822e (diff)
FIX: vxlan+vlan perf tests
Change-Id: I7115456a1ef64a0b92113a77fba2949005208b07 Signed-off-by: Jan Gelety <jgelety@cisco.com>
Diffstat (limited to 'resources/libraries')
-rw-r--r--resources/libraries/python/TestConfig.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/resources/libraries/python/TestConfig.py b/resources/libraries/python/TestConfig.py
index 9f83fbb5fc..5c624e2ca6 100644
--- a/resources/libraries/python/TestConfig.py
+++ b/resources/libraries/python/TestConfig.py
@@ -215,6 +215,7 @@ class TestConfig:
:type vxlan_count: int
:type node_vlan_if: str
"""
+ if_data = InterfaceUtil.vpp_get_interface_data(node)
if vxlan_count > 10:
commands = list()
for i in range(0, vxlan_count):
@@ -226,7 +227,7 @@ class TestConfig:
vlan_subif_name = \
f"{Topology.get_interface_name(node, node_vlan_if)}.{i + 1}"
vlan_idx = None
- for data in InterfaceUtil.vpp_get_interface_data(node):
+ for data in if_data:
if_name = data[u"interface_name"]
if not founds[u"vxlan"] and if_name == vxlan_subif_name:
vxlan_subif_idx = data[u"sw_if_index"]
@@ -279,7 +280,7 @@ class TestConfig:
vlan_subif_name = \
f"{Topology.get_interface_name(node, node_vlan_if)}.{i+1}"
vlan_idx = None
- for data in InterfaceUtil.vpp_get_interface_data(node):
+ for data in if_data:
if not founds[u"vxlan"] \
and data[u"interface_name"] == vxlan_subif_name:
vxlan_subif_idx = data[u"sw_if_index"]
@@ -340,19 +341,19 @@ class TestConfig:
dst_ip_start = ip_address(dst_ip_start)
if vxlan_count > 1:
- sw_idx_vxlan = Topology.get_interface_sw_index(node, node_vxlan_if)
+ idx_vxlan_if = Topology.get_interface_sw_index(node, node_vxlan_if)
commands = list()
for i in range(0, vxlan_count):
dst_ip = dst_ip_start + i * ip_step
commands.append(
- f"ip_neighbor_add_del sw_if_index {sw_idx_vxlan} "
+ f"ip_neighbor_add_del sw_if_index {idx_vxlan_if} "
f"dst {dst_ip} "
f"mac {Topology.get_interface_mac(op_node, op_node_if)}\n"
)
commands.append(
f"ip_route_add_del "
f"{dst_ip}/{128 if dst_ip.version == 6 else 32} count 1 "
- f"via {dst_ip} sw_if_index {sw_idx_vxlan}\n"
+ f"via {dst_ip} sw_if_index {idx_vxlan_if}\n"
)
sw_idx_vxlan = Topology.get_interface_sw_index(
node, f"vxlan_tunnel{i + 1}"