summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/topotests/bgp-snmp-mplsl3vpn/test_bgp_snmp_mplsvpn.py25
1 files changed, 19 insertions, 6 deletions
diff --git a/tests/topotests/bgp-snmp-mplsl3vpn/test_bgp_snmp_mplsvpn.py b/tests/topotests/bgp-snmp-mplsl3vpn/test_bgp_snmp_mplsvpn.py
index 89f5554d41..db4eab9d3d 100755
--- a/tests/topotests/bgp-snmp-mplsl3vpn/test_bgp_snmp_mplsvpn.py
+++ b/tests/topotests/bgp-snmp-mplsl3vpn/test_bgp_snmp_mplsvpn.py
@@ -505,10 +505,8 @@ def test_r1_mplsvpn_VrfTable():
associated_int = r1_snmp.get(
"mplsL3VpnVrfAssociatedInterfaces.{}".format(snmp_str_to_oid("VRF-a"))
)
- assertmsg = (
- "mplsL3VpnVrfAssociatedInterfaces incorrect should be 3 value {}".format(
- associated_int
- )
+ assertmsg = "mplsL3VpnVrfAssociatedInterfaces incorrect should be 3 value {}".format(
+ associated_int
)
assert associated_int == "3", assertmsg
@@ -634,7 +632,6 @@ rte_table_test = {
"C0 A8 C8 0A",
'""',
],
- "mplsL3VpnVrfRteInetCidrIfIndex": ["5", "6", "4", "5", "0", "6", "0"],
"mplsL3VpnVrfRteInetCidrType": [
"local(3)",
"local(3)",
@@ -732,8 +729,24 @@ def test_r1_mplsvpn_rte_table():
)
if passed:
break
+ # generate ifindex row grabbing ifindices from vtysh
+ if passed:
+ ifindex_row = [
+ router_interface_get_ifindex(r1r, "eth3"),
+ router_interface_get_ifindex(r1r, "eth4"),
+ router_interface_get_ifindex(r1r, "eth2"),
+ router_interface_get_ifindex(r1r, "eth3"),
+ "0",
+ router_interface_get_ifindex(r1r, "eth4"),
+ "0",
+ ]
+ if not r1_snmp.test_oid_walk(
+ "mplsL3VpnVrfRteInetCidrIfIndex", ifindex_row, oid_list
+ ):
+ passed = False
+
print("passed {}".format(passed))
- # assert passed, assertmsg
+ assert passed, assertmsg
def test_memory_leak():