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 0000000..f55a706 --- /dev/null +++ b/changelogs/fragments/259-add-routeros7-support-for-ip-vrf.yml @@ -0,0 +1,2 @@ +minor_changes: + - api_modify, api_info - add support for the ``ip vrf`` path in RouterOS 7 (https://github.com/ansible-collections/community.routeros/pull/259) diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index d2027d6..8353614 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -727,17 +727,33 @@ PATHS = { }, ), ), + ('ip', 'vrf'): APIData( + 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( - unversioned=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(), - }, - ), + 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( diff --git a/plugins/modules/api_info.py b/plugins/modules/api_info.py index 6eea5e8..216b2ab 100644 --- a/plugins/modules/api_info.py +++ b/plugins/modules/api_info.py @@ -147,6 +147,7 @@ options: - ip traffic-flow target - ip upnp - ip upnp interfaces + - ip vrf - ipv6 address - ipv6 dhcp-client - ipv6 dhcp-server diff --git a/plugins/modules/api_modify.py b/plugins/modules/api_modify.py index a683c2a..d9104bf 100644 --- a/plugins/modules/api_modify.py +++ b/plugins/modules/api_modify.py @@ -156,6 +156,7 @@ options: - ip traffic-flow target - ip upnp - ip upnp interfaces + - ip vrf - ipv6 address - ipv6 dhcp-client - ipv6 dhcp-server