Skip to content

Commit

Permalink
Fix crash when ssl parameter of api is used. (#3) (#139) (#140)
Browse files Browse the repository at this point in the history
Backport of 3c0df4b343fbd1515822236589062835206aaf86 from community.routeros.

(cherry picked from commit 136b25a)

Co-authored-by: Felix Fontein <[email protected]>
  • Loading branch information
patchback[bot] and felixfontein authored Oct 28, 2020
1 parent 89ea54f commit 7997e61
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/routeros-3-api-ssl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- "api - fix crash when the ``ssl`` parameter is used (https://github.com/ansible-collections/community.routeros/pull/3)."
6 changes: 3 additions & 3 deletions plugins/modules/network/routeros/routeros_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,15 +438,15 @@ def errors(self, e):
self.result['message'].append("%s" % e)
self.return_result(False, False)

def ros_api_connect(self, username, password, host, port, ssl):
def ros_api_connect(self, username, password, host, port, use_ssl):
# connect to routeros api
conn_status = {"connection": {"username": username,
"hostname": host,
"port": port,
"ssl": ssl,
"ssl": use_ssl,
"status": "Connected"}}
try:
if ssl is True:
if use_ssl is True:
if not port:
port = 8729
conn_status["connection"]["port"] = port
Expand Down

0 comments on commit 7997e61

Please sign in to comment.