diff options
| -rw-r--r-- | tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py | 7 | ||||
| -rw-r--r-- | tests/topotests/lib/ltemplate.py | 6 |
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): |
