Skip to content

Commit

Permalink
Add support for "iot modbus"
Browse files Browse the repository at this point in the history
The default values match those of RouterOS 7.11 on a Mikrotik
RB924i-2nD-BT5&BG77 ("Knot").

Upstream documentation:
https://help.mikrotik.com/docs/pages/viewpage.action?pageId=61046813

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
  • Loading branch information
hansmi committed Aug 23, 2023
1 parent adff9bb commit b07cf5c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/205-add-iot-modbus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- api_info, api_modify - add support for the ``iot modbus`` path (https://github.com/ansible-collections/community.routeros/pull/205).
10 changes: 10 additions & 0 deletions plugins/module_utils/_api_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1423,6 +1423,16 @@ def join_path(path):
'receive-errors': KeyInfo(default=False),
},
),
('iot', 'modbus'): APIData(
single_value=True,
fully_understood=True,
fields={
'disabled': KeyInfo(default=True),
'hardware-port': KeyInfo(default='modbus'),
'tcp-port': KeyInfo(default=502),
'timeout': KeyInfo(default=1000),
},
),
('ip', 'accounting'): APIData(
single_value=True,
fully_understood=True,
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/api_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
- interface wireless security-profiles
- interface wireless sniffer
- interface wireless snooper
- iot modbus
- ip accounting
- ip accounting web-access
- ip address
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/api_modify.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
- interface wireless security-profiles
- interface wireless sniffer
- interface wireless snooper
- iot modbus
- ip accounting
- ip accounting web-access
- ip address
Expand Down

0 comments on commit b07cf5c

Please sign in to comment.