Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

system logging API paths #127

Merged
merged 4 commits into from
Nov 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelogs/fragments/127-logging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
minor_changes:
- api_modify, api_info - support API paths ``system logging``, ``system logging action``
(https://github.com/ansible-collections/community.routeros/pull/127).
46 changes: 25 additions & 21 deletions plugins/module_utils/_api_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -2059,24 +2059,28 @@ def join_path(path):
},
),
('system', 'logging', 'action'): APIData(
has_identifier=True,
fully_understood=True,
primary_keys=('name',),
fields={
'bsd-syslog': KeyInfo(),
'disk-file-count': KeyInfo(),
'disk-file-name': KeyInfo(),
'disk-lines-per-file': KeyInfo(),
'disk-stop-on-full': KeyInfo(),
'memory-lines': KeyInfo(),
'memory-stop-on-full': KeyInfo(),
'bsd-syslog': KeyInfo(default=False),
'comment': KeyInfo(can_disable=True, remove_value=''),
'disk-file-count': KeyInfo(default=2),
'disk-file-name': KeyInfo(default='log'),
'disk-lines-per-file': KeyInfo(default=1000),
'disk-stop-on-full': KeyInfo(default=False),
'email-start-tls': KeyInfo(default=False),
'email-to': KeyInfo(default=''),
'memory-lines': KeyInfo(default=1000),
'memory-stop-on-full': KeyInfo(default=False),
'name': KeyInfo(),
'remember': KeyInfo(),
'remote': KeyInfo(),
'remote-port': KeyInfo(),
'src-address': KeyInfo(),
'syslog-facility': KeyInfo(),
'syslog-severity': KeyInfo(),
'syslog-time-format': KeyInfo(),
'target': KeyInfo(),
'remember': KeyInfo(default=True),
'remote': KeyInfo(default='0.0.0.0'),
'remote-port': KeyInfo(default=514),
'src-address': KeyInfo(default='0.0.0.0'),
'syslog-facility': KeyInfo(default='daemon'),
'syslog-severity': KeyInfo(default='auto'),
'syslog-time-format': KeyInfo(default='bsd-syslog'),
'target': KeyInfo(required=True),
},
),
('user', 'group'): APIData(
Expand Down Expand Up @@ -2148,12 +2152,12 @@ def join_path(path):
},
),
('system', 'logging'): APIData(
has_identifier=True,
fully_understood=True,
fields={
'action': KeyInfo(),
'disabled': KeyInfo(),
'prefix': KeyInfo(),
'topics': KeyInfo(),
'action': KeyInfo(default='memory'),
'disabled': KeyInfo(default=False),
'prefix': KeyInfo(default=''),
'topics': KeyInfo(default=''),
},
),
('system', 'resource', 'irq'): APIData(
Expand Down
2 changes: 2 additions & 0 deletions plugins/modules/api_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@
- system clock manual
- system identity
- system leds settings
- system logging
- system logging action
- system note
- system ntp client
- system ntp client servers
Expand Down
2 changes: 2 additions & 0 deletions plugins/modules/api_modify.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@
- system clock manual
- system identity
- system leds settings
- system logging
- system logging action
- system note
- system ntp client
- system ntp client servers
Expand Down