OVPN server accepts now multiple items (RouterOS >= 7.17) (#383)

* Since RouterOS 7.17 VRF is supported for OVPN server. It now supports
multiple entries and single-value is now obsolete. This demands for a
versioned API.

* Add change fragment

* Add change fragment

* add license field

* Update changelogs/fragments/385-vrf-support-for-ovpn-server

Co-authored-by: Felix Fontein <felix@fontein.de>

* rename

* remove license field

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Michael Jenny 2025-07-28 22:34:15 +02:00 committed by GitHub
parent 008b5f893a
commit c9d15bc43a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 47 additions and 17 deletions

View file

@ -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).

View file

@ -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(