Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 71 bandwidth #72

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions plugins/modules/facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,9 @@ def _populate_interfaces_status_interface(self, interface_table):
interface["mode"] = i[8].lower()

if i[6] == "Up":
interface["bandwith"] = int(i[3]) * 1000 # to get speed in kb
interface["bandwidth"] = int(i[3]) * 1000 # to get speed in kb
else:
interface["bandwith"] = None
interface["bandwidth"] = None

for key in interface:
if interface[key] == "--":
Expand All @@ -449,9 +449,9 @@ def _populate_interfaces_status_portchanel(self, interface_table):
interface["control"] = i[5].lower()

if i[6] == "Up":
interface["bandwith"] = int(i[3]) * 1000 # to get speed in kb
interface["bandwidth"] = int(i[3]) * 1000 # to get speed in kb
else:
interface["bandwith"] = None
interface["bandwidth"] = None

for key in interface:
if interface[key] == "--":
Expand Down Expand Up @@ -624,7 +624,7 @@ def _new_interface(self, interface):
self.facts["interfaces"][interface]["admin_state"] = "up"
self.facts["interfaces"][interface]["description"] = None
self.facts["interfaces"][interface]["state"] = "up"
self.facts["interfaces"][interface]["bandwith"] = None
self.facts["interfaces"][interface]["bandwidth"] = None
self.facts["interfaces"][interface]["duplex"] = None
self.facts["interfaces"][interface]["negotiation"] = None
self.facts["interfaces"][interface]["control"] = None
Expand Down