From 0da9606644117e4b85e0dcff2b6a1bdd929def69 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Fri, 9 Jun 2023 08:18:34 +0200 Subject: [PATCH] test: infamy: raise exception if dut mgmt ip cannot be found Signed-off-by: Joachim Wiberg --- test/infamy/env.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/infamy/env.py b/test/infamy/env.py index d3018a9e..8ffcd8f4 100644 --- a/test/infamy/env.py +++ b/test/infamy/env.py @@ -85,7 +85,12 @@ class Env(object): hostport = list(self.ptop.neighbors(f"{node}:{port}"))[0] hnode, hport = hostport.split(":") + print(f"Probing {node} on port {hport} for IPv6LL mgmt address ...") mgmtip = neigh.ll6ping(hport) + if not mgmtip: + raise Exception(f"Failed, cannot find mgmt IP for {node}") + + print(f"Mgmt IP {mgmtip}") return netconf.Device( location=netconf.Location(mgmtip), mapping=mapping,