diff --git a/nornir_srl/connections/srlinux.py b/nornir_srl/connections/srlinux.py index 9e3d256..c370267 100644 --- a/nornir_srl/connections/srlinux.py +++ b/nornir_srl/connections/srlinux.py @@ -199,8 +199,12 @@ def augment_routes(d, attribs): # augment routes with attributes + ("*" if d["valid-route"] else "") + (">" if d["best-route"] else "") ) - if d.get("vni", 0) == 0: - d["vni"] = "-" + if "label1" in d: # from SRL 24.3 onwards for mac/ip routes + d["vni"] = d["label1"].get("value", "-") + elif "label" in d: # for SRL 24.3 onwards + d["vni"] = d["label"].get("value", "-") + else: + d["vni"] = d.get("vni", "-") d["_rt"] = ",".join( [ x_comm.split("target:")[1] diff --git a/pyproject.toml b/pyproject.toml index f4bd573..c61c2db 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "nornir-srl" -version = "0.2.16" +version = "0.2.17" description = "Nornir connection plugin for SRLinux" authors = ["Walter De Smedt "] readme = "README.md"