Skip to content

Commit

Permalink
Merge pull request #21 from srl-labs/fix-vni
Browse files Browse the repository at this point in the history
fix vni field for bgp-rib/evpn routes due to model change in SRL 24.3
  • Loading branch information
wdesmedt authored Jun 20, 2024
2 parents 9eaa0db + 298efcb commit 66d2560
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions nornir_srl/connections/srlinux.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 66d2560

Please sign in to comment.