Skip to content

Commit

Permalink
adding "system ntp *" paths related to ROS7 (#122)
Browse files Browse the repository at this point in the history
* adding "system ntp *" paths related to ROS7

Signed-off-by: Tomas Herfert <herfik>

* changelog

Signed-off-by: Tomas Herfert <herfik>

* docs

Signed-off-by: Tomas Herfert <herfik>

* typo

Signed-off-by: Tomas Herfert <herfik>

* sanity fix

Signed-off-by: Tomas Herfert <herfik>

* setting the correct defaults

Signed-off-by: Tomas Herfert <herfik>

* Apply suggestions from code review

Co-authored-by: Felix Fontein <[email protected]>

* typo

Signed-off-by: Tomas Herfert <herfik>
Co-authored-by: Tomas Herfert <herfik>
Co-authored-by: Felix Fontein <[email protected]>
  • Loading branch information
therfert and felixfontein authored Nov 10, 2022
1 parent c2e58c3 commit 1e36dfa
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
4 changes: 4 additions & 0 deletions changelogs/fragments/122-api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
minor_changes:
- api_modify, api_info - support paths ``system ntp client servers`` and ``system ntp server`` available in ROS7,
as well as new fields ``servers``, ``mode``, and ``vrf`` for ``system ntp client``
(https://github.com/ansible-collections/community.routeros/pull/122).
31 changes: 31 additions & 0 deletions plugins/module_utils/_api_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1487,6 +1487,37 @@ def join_path(path):
'primary-ntp': KeyInfo(default='0.0.0.0'),
'secondary-ntp': KeyInfo(default='0.0.0.0'),
'server-dns-names': KeyInfo(default=''),
'servers': KeyInfo(default=''),
'mode': KeyInfo(default='unicast'),
'vrf': KeyInfo(default='main'),
},
),
('system', 'ntp', 'client', 'servers'): APIData(
primary_keys=('address', ),
fully_understood=True,
fields={
'comment': KeyInfo(can_disable=True, remove_value=''),
'disabled': KeyInfo(default=False),
'address': KeyInfo(),
'auth-key': KeyInfo(default='none'),
'iburst': KeyInfo(default=True),
'max-poll': KeyInfo(default=10),
'min-poll': KeyInfo(default=6),
},
),
('system', 'ntp', 'server'): APIData(
single_value=True,
fully_understood=True,
fields={
'auth-key': KeyInfo(default='none'),
'broadcast': KeyInfo(default=False),
'broadcast-addresses': KeyInfo(default=''),
'enabled': KeyInfo(default=False),
'local-clock-stratum': KeyInfo(default=5),
'manycast': KeyInfo(default=False),
'multicast': KeyInfo(default=False),
'use-local-clock': KeyInfo(default=False),
'vrf': KeyInfo(default='main'),
},
),
('system', 'package', 'update'): 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 @@ -117,6 +117,8 @@
- system leds settings
- system note
- system ntp client
- system ntp client servers
- system ntp server
- system package update
- system routerboard settings
- system upgrade mirror
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 @@ -122,6 +122,8 @@
- system leds settings
- system note
- system ntp client
- system ntp client servers
- system ntp server
- system package update
- system routerboard settings
- system upgrade mirror
Expand Down

0 comments on commit 1e36dfa

Please sign in to comment.