diff --git a/changelogs/fragments/385-vrf-support-for-ovpn-server.yml b/changelogs/fragments/385-vrf-support-for-ovpn-server.yml new file mode 100644 index 0000000..4790a9d --- /dev/null +++ b/changelogs/fragments/385-vrf-support-for-ovpn-server.yml @@ -0,0 +1,7 @@ +--- +minor_changes: + - api_info, api_modify - since RouterOS 7.17 VRF is supported for OVPN server. + It now supports multiple entries, while ``api_modify`` so far only accepted a single entry. + The ``interface ovpn-server server`` path now allows multiple entries + on RouterOS 7.17 and newer + (https://github.com/ansible-collections/community.routeros/pull/383). diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index 10505f3..2b44b8b 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -1664,23 +1664,46 @@ PATHS = { ), ), ('interface', 'ovpn-server', 'server'): APIData( - unversioned=VersionedAPIData( - single_value=True, - fully_understood=True, - fields={ - 'auth': KeyInfo(), - 'cipher': KeyInfo(), - 'default-profile': KeyInfo(default='default'), - 'enabled': KeyInfo(default=False), - 'keepalive-timeout': KeyInfo(default=60), - 'mac-address': KeyInfo(), - 'max-mtu': KeyInfo(default=1500), - 'mode': KeyInfo(default='ip'), - 'netmask': KeyInfo(default=24), - 'port': KeyInfo(default=1194), - 'require-client-certificate': KeyInfo(default=False), - }, - ), + versioned=[ + ('7.17', '>=', VersionedAPIData( + fully_understood=True, + fields={ + 'auth': KeyInfo(), + 'cipher': KeyInfo(), + 'default-profile': KeyInfo(default='default'), + 'enabled': KeyInfo(default=False), + 'keepalive-timeout': KeyInfo(default=60), + 'mac-address': KeyInfo(), + 'max-mtu': KeyInfo(default=1500), + 'mode': KeyInfo(default='ip'), + 'name': KeyInfo(default=''), + 'netmask': KeyInfo(default=24), + 'port': KeyInfo(default=1194), + 'protocol': KeyInfo(default='tcp'), + 'require-client-certificate': KeyInfo(default=False), + 'vrf': KeyInfo(default='main'), + }, + )), + ('7.17', '<', VersionedAPIData( + single_value=True, + fully_understood=True, + fields={ + 'auth': KeyInfo(), + 'cipher': KeyInfo(), + 'default-profile': KeyInfo(default='default'), + 'enabled': KeyInfo(default=False), + 'keepalive-timeout': KeyInfo(default=60), + 'mac-address': KeyInfo(), + 'max-mtu': KeyInfo(default=1500), + 'mode': KeyInfo(default='ip'), + 'name': KeyInfo(default=''), + 'netmask': KeyInfo(default=24), + 'port': KeyInfo(default=1194), + 'protocol': KeyInfo(default='tcp'), + 'require-client-certificate': KeyInfo(default=False), + }, + )) + ] ), ('interface', 'pppoe-server', 'server'): APIData( unversioned=VersionedAPIData(