Skip to content

Commit

Permalink
Speed is a float in the napalm model
Browse files Browse the repository at this point in the history
Just like uptime, the napalm base models expects speed to be a float, so
we will just be conform
  • Loading branch information
inetAnt committed Feb 7, 2024
1 parent 6d2b144 commit 3198573
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions napalm_servertech_pro2/pro2.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def get_interfaces(self):
{
"id": "NET",
"name": "management",
"speed": int(net["speed"].split(" ")[0]),
"speed": float(net["speed"].split(" ")[0]),
"status": "Normal" if net["link"] == "Up" else False,
"state": "On",
"mac_address": net["ethernet_mac_address"].replace("-", ":"),
Expand All @@ -189,7 +189,7 @@ def get_interfaces(self):
"is_enabled": True if port["state"] == "On" else False,
"description": port["name"],
"last_flapped": -1.0,
"speed": port.get("speed", 0),
"speed": port.get("speed", 0.0),
"mtu": port.get("mtu", 0),
"mac_address": port.get("mac_address", ""),
}
Expand Down

0 comments on commit 3198573

Please sign in to comment.