diff --git a/changelogs/fragments/122-api.yml b/changelogs/fragments/122-api.yml new file mode 100644 index 00000000..399dabec --- /dev/null +++ b/changelogs/fragments/122-api.yml @@ -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). diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index 5ba3e26d..fbaa9c37 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -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( diff --git a/plugins/modules/api_info.py b/plugins/modules/api_info.py index b7db4659..a297d630 100644 --- a/plugins/modules/api_info.py +++ b/plugins/modules/api_info.py @@ -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 diff --git a/plugins/modules/api_modify.py b/plugins/modules/api_modify.py index 5b3fc15a..a77fdc14 100644 --- a/plugins/modules/api_modify.py +++ b/plugins/modules/api_modify.py @@ -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