From a0e3a79227320931462b42024d63a314ce7f6047 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann Date: Fri, 1 Sep 2023 19:33:48 +0200 Subject: [PATCH] Support "date", "time" and "gmt-offset" in "system clock" These properties are necessary to read and set the time as seen by RouterOS. Signed-off-by: Michael Hanselmann --- changelogs/fragments/210-date-time-gmt-offset.yml | 2 ++ plugins/module_utils/_api_data.py | 3 +++ 2 files changed, 5 insertions(+) create mode 100644 changelogs/fragments/210-date-time-gmt-offset.yml diff --git a/changelogs/fragments/210-date-time-gmt-offset.yml b/changelogs/fragments/210-date-time-gmt-offset.yml new file mode 100644 index 00000000..7e3d1141 --- /dev/null +++ b/changelogs/fragments/210-date-time-gmt-offset.yml @@ -0,0 +1,2 @@ +minor_changes: + - api_info, api_modify - add support for ``user``, ``time`` and ``gmt-offset`` under the ``system clock`` path (https://github.com/ansible-collections/community.routeros/pull/210). diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index 28ff4e53..9eac5ec3 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -2551,6 +2551,9 @@ def join_path(path): single_value=True, fully_understood=True, fields={ + 'date': KeyInfo(), + 'gmt-offset': KeyInfo(), + 'time': KeyInfo(), 'time-zone-autodetect': KeyInfo(default=True), 'time-zone-name': KeyInfo(default='manual'), },