Skip to content

Commit

Permalink
Add support for "tool netwatch"
Browse files Browse the repository at this point in the history
Upstream documentation:
https://help.mikrotik.com/docs/display/ROS/Netwatch

Signed-off-by: Michael Hanselmann <[email protected]>
  • Loading branch information
hansmi committed Sep 13, 2023
1 parent 4d8ebae commit 00ef1af
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/216-add-tool-netwatch.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 ``tool netwatch`` path in RouterOS 7 (https://github.com/ansible-collections/community.routeros/pull/216).
38 changes: 38 additions & 0 deletions plugins/module_utils/_api_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3155,6 +3155,44 @@ def join_path(path):
},
),
),
('tool', 'netwatch'): APIData(
versioned=[
('7', '>=', VersionedAPIData(
fully_understood=True,
primary_keys=('name', ),
fields={
'certificate': KeyInfo(),
'check-certificate': KeyInfo(),
'comment': KeyInfo(),
'disabled': KeyInfo(default=False),
'down-script': KeyInfo(),
'host': KeyInfo(required=True),
'http-codes': KeyInfo(),
'interval': KeyInfo(),
'name': KeyInfo(),
'packet-count': KeyInfo(),
'packet-interval': KeyInfo(),
'packet-size': KeyInfo(),
'port': KeyInfo(),
'src-address': KeyInfo(),
'start-delay': KeyInfo(),
'startup-delay': KeyInfo(),
'test-script': KeyInfo(),
'thr-avg': KeyInfo(),
'thr-http-time': KeyInfo(),
'thr-jitter': KeyInfo(),
'thr-loss-count': KeyInfo(),
'thr-loss-percent': KeyInfo(),
'thr-max': KeyInfo(),
'thr-stdev': KeyInfo(),
'thr-tcp-conn-time': KeyInfo(),
'timeout': KeyInfo(),
'type': KeyInfo(default='simple'),
'up-script': KeyInfo(),
},
),
],
),
('tool', 'romon'): APIData(
unversioned=VersionedAPIData(
single_value=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 @@ -189,6 +189,7 @@
- tool mac-server
- tool mac-server mac-winbox
- tool mac-server ping
- tool netwatch
- tool romon
- tool sms
- tool sniffer
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 @@ -194,6 +194,7 @@
- tool mac-server
- tool mac-server mac-winbox
- tool mac-server ping
- tool netwatch
- tool romon
- tool sms
- tool sniffer
Expand Down

0 comments on commit 00ef1af

Please sign in to comment.