diff --git a/changelogs/fragments/205-add-iot-modbus.yml b/changelogs/fragments/205-add-iot-modbus.yml new file mode 100644 index 00000000..90a5875d --- /dev/null +++ b/changelogs/fragments/205-add-iot-modbus.yml @@ -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). diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index 2317b143..1b0f812e 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -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, diff --git a/plugins/modules/api_info.py b/plugins/modules/api_info.py index 0aa27029..f197a9a6 100644 --- a/plugins/modules/api_info.py +++ b/plugins/modules/api_info.py @@ -86,6 +86,7 @@ - interface wireless security-profiles - interface wireless sniffer - interface wireless snooper + - iot modbus - ip accounting - ip accounting web-access - ip address diff --git a/plugins/modules/api_modify.py b/plugins/modules/api_modify.py index 99655027..8a2654bb 100644 --- a/plugins/modules/api_modify.py +++ b/plugins/modules/api_modify.py @@ -91,6 +91,7 @@ - interface wireless security-profiles - interface wireless sniffer - interface wireless snooper + - iot modbus - ip accounting - ip accounting web-access - ip address