From e5199d31d8808f6aa59ebaa8607dd2dfbfab2e89 Mon Sep 17 00:00:00 2001 From: liquorice-head <40302350+liquorice-head@users.noreply.github.com> Date: Tue, 6 Feb 2024 14:23:44 +0400 Subject: [PATCH 01/11] Update api_info.py --- plugins/modules/api_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/api_info.py b/plugins/modules/api_info.py index 6eea5e8c..c6e7fd52 100644 --- a/plugins/modules/api_info.py +++ b/plugins/modules/api_info.py @@ -135,7 +135,7 @@ - ip pool - ip proxy - ip route - - ip route vrf + - ip vrf - ip service - ip settings - ip smb From d92691302794e31a6e470d46a4c1191d5e5d7040 Mon Sep 17 00:00:00 2001 From: liquorice-head <40302350+liquorice-head@users.noreply.github.com> Date: Tue, 6 Feb 2024 14:24:06 +0400 Subject: [PATCH 02/11] Update api_modify.py --- plugins/modules/api_modify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/api_modify.py b/plugins/modules/api_modify.py index a683c2a8..a99a6a72 100644 --- a/plugins/modules/api_modify.py +++ b/plugins/modules/api_modify.py @@ -144,7 +144,7 @@ - ip pool - ip proxy - ip route - - ip route vrf + - ip vrf - ip service - ip settings - ip smb From 1dea4f08a0767353a10b8e5a40cd0a84c76e9632 Mon Sep 17 00:00:00 2001 From: liquorice-head <40302350+liquorice-head@users.noreply.github.com> Date: Tue, 6 Feb 2024 14:26:11 +0400 Subject: [PATCH 03/11] Update _api_data.py --- plugins/module_utils/_api_data.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index d2027d6d..e8442e6e 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -727,15 +727,16 @@ def join_path(path): }, ), ), - ('ip', 'route', 'vrf'): APIData( + ('ip', 'vrf'): APIData( unversioned=VersionedAPIData( fully_understood=True, - primary_keys=('routing-mark', ), + primary_keys=('name', ), fields={ 'comment': KeyInfo(can_disable=True, remove_value=''), 'disabled': KeyInfo(default=False), 'interfaces': KeyInfo(), - 'routing-mark': KeyInfo(), + 'name': KeyInfo(), + 'numbers': KeyInfo(), }, ), ), From 065652b41952851b9f0ee5115ea34383f343feec Mon Sep 17 00:00:00 2001 From: liquorice-head <40302350+liquorice-head@users.noreply.github.com> Date: Tue, 6 Feb 2024 15:24:51 +0400 Subject: [PATCH 04/11] Update _api_data.py --- plugins/module_utils/_api_data.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index e8442e6e..dd581a2e 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -736,7 +736,6 @@ def join_path(path): 'disabled': KeyInfo(default=False), 'interfaces': KeyInfo(), 'name': KeyInfo(), - 'numbers': KeyInfo(), }, ), ), From 2503eec9b94c04b919b5cca1d998cb68a2b41dae Mon Sep 17 00:00:00 2001 From: liquorice-head <40302350+liquorice-head@users.noreply.github.com> Date: Tue, 13 Feb 2024 10:33:32 +0400 Subject: [PATCH 05/11] Update _api_data.py --- plugins/module_utils/_api_data.py | 36 ++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index dd581a2e..8353614a 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -728,16 +728,32 @@ def join_path(path): ), ), ('ip', 'vrf'): APIData( - unversioned=VersionedAPIData( - fully_understood=True, - primary_keys=('name', ), - fields={ - 'comment': KeyInfo(can_disable=True, remove_value=''), - 'disabled': KeyInfo(default=False), - 'interfaces': KeyInfo(), - 'name': KeyInfo(), - }, - ), + versioned=[ + ('7', '>=', VersionedAPIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'interfaces': KeyInfo(), + 'name': KeyInfo(), + }, + )), + ] + ), + ('ip', 'route', 'vrf'): APIData( + versioned=[ + ('7', '<', VersionedAPIData( + fully_understood=True, + primary_keys=('routing-mark', ), + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'interfaces': KeyInfo(), + 'routing-mark': KeyInfo(), + }, + )), + ], ), ('ip', 'dhcp-server'): APIData( unversioned=VersionedAPIData( From edbdb58ebbd43ffcbc659ef4bcb14a623cc8bcac Mon Sep 17 00:00:00 2001 From: liquorice-head <40302350+liquorice-head@users.noreply.github.com> Date: Tue, 13 Feb 2024 10:34:13 +0400 Subject: [PATCH 06/11] Update api_info.py --- plugins/modules/api_info.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/modules/api_info.py b/plugins/modules/api_info.py index c6e7fd52..4a1255bd 100644 --- a/plugins/modules/api_info.py +++ b/plugins/modules/api_info.py @@ -135,6 +135,7 @@ - ip pool - ip proxy - ip route + - ip route vrf - ip vrf - ip service - ip settings From 735341f3a7c33951c2ee94f937b0a165e5014bc1 Mon Sep 17 00:00:00 2001 From: liquorice-head <40302350+liquorice-head@users.noreply.github.com> Date: Tue, 13 Feb 2024 10:34:45 +0400 Subject: [PATCH 07/11] Update api_modify.py --- plugins/modules/api_modify.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/modules/api_modify.py b/plugins/modules/api_modify.py index a99a6a72..bd00ff45 100644 --- a/plugins/modules/api_modify.py +++ b/plugins/modules/api_modify.py @@ -144,6 +144,7 @@ - ip pool - ip proxy - ip route + - ip route vrf - ip vrf - ip service - ip settings From 21ff4b55d0126a0f7f3b3d1f53cf9f0b523b5f41 Mon Sep 17 00:00:00 2001 From: liquorice-head <40302350+liquorice-head@users.noreply.github.com> Date: Wed, 14 Feb 2024 11:07:33 +0400 Subject: [PATCH 08/11] Update api_info.py --- plugins/modules/api_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/api_info.py b/plugins/modules/api_info.py index 4a1255bd..216b2ab4 100644 --- a/plugins/modules/api_info.py +++ b/plugins/modules/api_info.py @@ -136,7 +136,6 @@ - ip proxy - ip route - ip route vrf - - ip vrf - ip service - ip settings - ip smb @@ -148,6 +147,7 @@ - ip traffic-flow target - ip upnp - ip upnp interfaces + - ip vrf - ipv6 address - ipv6 dhcp-client - ipv6 dhcp-server From d641a94eaa7eb8cd33bd02ff07d3ce0adcea4ada Mon Sep 17 00:00:00 2001 From: liquorice-head <40302350+liquorice-head@users.noreply.github.com> Date: Wed, 14 Feb 2024 11:08:12 +0400 Subject: [PATCH 09/11] Update api_modify.py --- plugins/modules/api_modify.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/api_modify.py b/plugins/modules/api_modify.py index bd00ff45..d9104bfb 100644 --- a/plugins/modules/api_modify.py +++ b/plugins/modules/api_modify.py @@ -145,7 +145,6 @@ - ip proxy - ip route - ip route vrf - - ip vrf - ip service - ip settings - ip smb @@ -157,6 +156,7 @@ - ip traffic-flow target - ip upnp - ip upnp interfaces + - ip vrf - ipv6 address - ipv6 dhcp-client - ipv6 dhcp-server From 10e7c270288e68e5a2b88e5e6ebd088e3e081cd1 Mon Sep 17 00:00:00 2001 From: liquorice-head <40302350+liquorice-head@users.noreply.github.com> Date: Wed, 14 Feb 2024 12:06:54 +0400 Subject: [PATCH 10/11] Create 259-add-routeros7-support-for-ip-vrf.yml --- changelogs/fragments/259-add-routeros7-support-for-ip-vrf.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelogs/fragments/259-add-routeros7-support-for-ip-vrf.yml diff --git a/changelogs/fragments/259-add-routeros7-support-for-ip-vrf.yml b/changelogs/fragments/259-add-routeros7-support-for-ip-vrf.yml new file mode 100644 index 00000000..6fba1a75 --- /dev/null +++ b/changelogs/fragments/259-add-routeros7-support-for-ip-vrf.yml @@ -0,0 +1,3 @@ +minor_changes: + - api_data - add support for the ``ip vrf`` path in RouterOS 7 and add support new primary_keys ``routing-mark`` for RouterOS 7 (https://github.com/ansible-collections/community.routeros/pull/259) + - api_modify, api_info - add support for the ``ip vrf`` path in RouterOS 7 (https://github.com/ansible-collections/community.routeros/pull/259) From 05d64c6cf0cbcdc2e19d7ea135ddb686503021bc Mon Sep 17 00:00:00 2001 From: liquorice-head <40302350+liquorice-head@users.noreply.github.com> Date: Thu, 15 Feb 2024 10:40:37 +0400 Subject: [PATCH 11/11] Update changelogs/fragments/259-add-routeros7-support-for-ip-vrf.yml Co-authored-by: Felix Fontein --- changelogs/fragments/259-add-routeros7-support-for-ip-vrf.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/changelogs/fragments/259-add-routeros7-support-for-ip-vrf.yml b/changelogs/fragments/259-add-routeros7-support-for-ip-vrf.yml index 6fba1a75..f55a7062 100644 --- a/changelogs/fragments/259-add-routeros7-support-for-ip-vrf.yml +++ b/changelogs/fragments/259-add-routeros7-support-for-ip-vrf.yml @@ -1,3 +1,2 @@ minor_changes: - - api_data - add support for the ``ip vrf`` path in RouterOS 7 and add support new primary_keys ``routing-mark`` for RouterOS 7 (https://github.com/ansible-collections/community.routeros/pull/259) - api_modify, api_info - add support for the ``ip vrf`` path in RouterOS 7 (https://github.com/ansible-collections/community.routeros/pull/259)