From 64ee613a0d7ac1f49f9d9775d825232fa84fada1 Mon Sep 17 00:00:00 2001 From: hansmi Date: Thu, 1 Aug 2024 17:06:02 +0200 Subject: [PATCH] Add support for the "ipv6 nd prefix" path (#303) Upstream documentation: https://help.mikrotik.com/docs/display/ROS/IPv6+Neighbor+Discovery#IPv6NeighborDiscovery-Prefix --- changelogs/fragments/303-add-ipv6-nd-prefix.yml | 2 ++ plugins/module_utils/_api_data.py | 16 ++++++++++++++++ plugins/modules/api_info.py | 1 + plugins/modules/api_modify.py | 1 + 4 files changed, 20 insertions(+) create mode 100644 changelogs/fragments/303-add-ipv6-nd-prefix.yml diff --git a/changelogs/fragments/303-add-ipv6-nd-prefix.yml b/changelogs/fragments/303-add-ipv6-nd-prefix.yml new file mode 100644 index 00000000..b28915a6 --- /dev/null +++ b/changelogs/fragments/303-add-ipv6-nd-prefix.yml @@ -0,0 +1,2 @@ +minor_changes: + - api_info, api_modify - add support for the ``ipv6 nd prefix`` path (https://github.com/ansible-collections/community.routeros/pull/303). diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index 685c1207..3401d64b 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -3697,6 +3697,22 @@ def join_path(path): }, ), ), + ('ipv6', 'nd', 'prefix'): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + fields={ + '6to4-interface': KeyInfo(default='none'), + 'autonomous': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'interface': KeyInfo(required=True), + 'on-link': KeyInfo(default=True), + 'preferred-lifetime': KeyInfo(), + 'prefix': KeyInfo(), + 'valid-lifetime': KeyInfo(), + }, + ), + ), ('ipv6', 'nd', 'prefix', 'default'): APIData( unversioned=VersionedAPIData( single_value=True, diff --git a/plugins/modules/api_info.py b/plugins/modules/api_info.py index 5f47c35a..4a5eff4d 100644 --- a/plugins/modules/api_info.py +++ b/plugins/modules/api_info.py @@ -174,6 +174,7 @@ - ipv6 firewall nat - ipv6 firewall raw - ipv6 nd + - ipv6 nd prefix - ipv6 nd prefix default - ipv6 route - ipv6 settings diff --git a/plugins/modules/api_modify.py b/plugins/modules/api_modify.py index 195b2a94..42abafb6 100644 --- a/plugins/modules/api_modify.py +++ b/plugins/modules/api_modify.py @@ -183,6 +183,7 @@ - ipv6 firewall nat - ipv6 firewall raw - ipv6 nd + - ipv6 nd prefix - ipv6 nd prefix default - ipv6 route - ipv6 settings