summaryrefslogtreecommitdiffstats
path: root/ansible_collections/community/ciscosmb/plugins
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 16:18:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-05 16:18:34 +0000
commit3667197efb7b18ec842efd504785965911f8ac4b (patch)
tree0b986a4bc6879d080b100666a97cdabbc9ca1f28 /ansible_collections/community/ciscosmb/plugins
parentAdding upstream version 9.5.1+dfsg. (diff)
downloadansible-3667197efb7b18ec842efd504785965911f8ac4b.tar.xz
ansible-3667197efb7b18ec842efd504785965911f8ac4b.zip
Adding upstream version 10.0.0+dfsg.upstream/10.0.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/community/ciscosmb/plugins')
-rw-r--r--ansible_collections/community/ciscosmb/plugins/modules/facts.py13
-rw-r--r--ansible_collections/community/ciscosmb/plugins/terminal/ciscosmb.py3
2 files changed, 9 insertions, 7 deletions
diff --git a/ansible_collections/community/ciscosmb/plugins/modules/facts.py b/ansible_collections/community/ciscosmb/plugins/modules/facts.py
index 23cd9820a..a8744ef3c 100644
--- a/ansible_collections/community/ciscosmb/plugins/modules/facts.py
+++ b/ansible_collections/community/ciscosmb/plugins/modules/facts.py
@@ -423,9 +423,11 @@ class Interfaces(FactsBase):
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
+ interface["bandwith"] = interface["bandwidth"]
else:
- interface["bandwith"] = None
+ interface["bandwidth"] = None
+ interface["bandwith"] = interface["bandwidth"]
for key in interface:
if interface[key] == "--":
@@ -449,9 +451,11 @@ class Interfaces(FactsBase):
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
+ interface["bandwith"] = interface["bandwidth"]
else:
- interface["bandwith"] = None
+ interface["bandwidth"] = None
+ interface["bandwith"] = interface["bandwidth"]
for key in interface:
if interface[key] == "--":
@@ -624,6 +628,7 @@ class Interfaces(FactsBase):
self.facts["interfaces"][interface]["admin_state"] = "up"
self.facts["interfaces"][interface]["description"] = None
self.facts["interfaces"][interface]["state"] = "up"
+ self.facts["interfaces"][interface]["bandwidth"] = None
self.facts["interfaces"][interface]["bandwith"] = None
self.facts["interfaces"][interface]["duplex"] = None
self.facts["interfaces"][interface]["negotiation"] = None
diff --git a/ansible_collections/community/ciscosmb/plugins/terminal/ciscosmb.py b/ansible_collections/community/ciscosmb/plugins/terminal/ciscosmb.py
index e8aa46d9b..6bb4d8a89 100644
--- a/ansible_collections/community/ciscosmb/plugins/terminal/ciscosmb.py
+++ b/ansible_collections/community/ciscosmb/plugins/terminal/ciscosmb.py
@@ -80,9 +80,6 @@ class TerminalModule(TerminalBase):
)
def on_become(self, passwd=None):
- if self._get_prompt().endswith(b"#"):
- return
-
cmd = {u"command": u"enable"}
if passwd:
# Note: python-3.5 cannot combine u"" and r"" together. Thus make