summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2021-09-29 07:29:39 -0400
committerGitHub <noreply@github.com>2021-09-29 07:29:39 -0400
commitffd7467cc43a0593b21cbf7e62d4fdb1ff8688e7 (patch)
tree868b426320fcc3b09a9f59a21f78a1e4e6caafb2
parent2e2d2be87f9de25aab5ac9556f7aef0f2fa79bc0 (diff)
parent1b9ebabb27ff74512611742543b214ab9a2ae0dd (diff)
Merge pull request #9688 from LabNConsulting/working/lb/fix-tt-bgp-vrf
tests: get bgp_l3vpn_to_bgp_vrf running again, also improve logging (minor)
-rw-r--r--tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py7
-rw-r--r--tests/topotests/lib/ltemplate.py6
2 files changed, 10 insertions, 3 deletions
diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py b/tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py
index 8fd344696e..fce8e708f2 100644
--- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py
+++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py
@@ -206,7 +206,7 @@ def ltemplatePreRouterStartHook():
for cmd in cmds:
cc.doCmd(tgen, rtr, cmd.format(rtr))
cc.doCmd(tgen, rtr, "ip link set dev {0}-eth0 master {0}-cust2".format(rtr))
- if cc.getOutput() != 4:
+ if cc.getOutput() != 0:
InitSuccess = False
logger.info(
"Unexpected output seen ({} times, tests will be skipped".format(
@@ -214,6 +214,11 @@ def ltemplatePreRouterStartHook():
)
)
else:
+ rtrs = ["r1", "r3", "r4", "ce4"]
+ for rtr in rtrs:
+ logger.info("{} configured".format(rtr))
+ cc.doCmd(tgen, rtr, "ip -d link show type vrf")
+ cc.doCmd(tgen, rtr, "ip link show")
InitSuccess = True
logger.info("VRF config successful!")
return InitSuccess
diff --git a/tests/topotests/lib/ltemplate.py b/tests/topotests/lib/ltemplate.py
index 910573c14c..c98bfac9ee 100644
--- a/tests/topotests/lib/ltemplate.py
+++ b/tests/topotests/lib/ltemplate.py
@@ -217,6 +217,7 @@ class ltemplateRtrCmd:
self.resetCounts()
def doCmd(self, tgen, rtr, cmd, checkstr=None):
+ logger.info("doCmd: {} {}".format(rtr, cmd))
output = tgen.net[rtr].cmd(cmd).strip()
if len(output):
self.output += 1
@@ -227,9 +228,10 @@ class ltemplateRtrCmd:
else:
self.match += 1
return ret
- logger.info("command: {} {}".format(rtr, cmd))
logger.info("output: " + output)
- self.none += 1
+ else:
+ logger.info("No output")
+ self.none += 1
return None
def resetCounts(self):