diff --git a/changelogs/fragments/143-add-wireguard.yml b/changelogs/fragments/143-add-wireguard.yml new file mode 100644 index 0000000..a098092 --- /dev/null +++ b/changelogs/fragments/143-add-wireguard.yml @@ -0,0 +1,2 @@ +minor_changes: + - api_modify, api_info - support API paths ``interface wireguard``, ``interface wireguard peers`` (https://github.com/ansible-collections/community.routeros/pull/143). diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index 04f1f2b..9d4b4c8 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -1150,6 +1150,33 @@ PATHS = { 'verify-client-certificate': KeyInfo(default='no'), }, ), + ('interface', 'wireguard'): APIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'listen-port': KeyInfo(), + 'mtu': KeyInfo(default=1420), + 'name': KeyInfo(), + 'private-key': KeyInfo(), + }, + ), + ('interface', 'wireguard', 'peers'): APIData( + fully_understood=True, + primary_keys=('public-key', 'interface'), + fields={ + 'allowed-address': KeyInfo(), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'endpoint-address': KeyInfo(), + 'endpoint-port': KeyInfo(default=0), + 'interface': KeyInfo(), + 'persistent-keepalive': KeyInfo(), + 'preshared-key': KeyInfo(), + 'public-key': KeyInfo(), + }, + ), ('interface', 'wireless', 'align'): APIData( single_value=True, fully_understood=True, diff --git a/plugins/modules/api_info.py b/plugins/modules/api_info.py index e354fda..9d94088 100644 --- a/plugins/modules/api_info.py +++ b/plugins/modules/api_info.py @@ -75,6 +75,8 @@ options: - interface sstp-server server - interface vlan - interface vrrp + - interface wireguard + - interface wireguard peers - interface wireless align - interface wireless cap - interface wireless sniffer diff --git a/plugins/modules/api_modify.py b/plugins/modules/api_modify.py index 45d7f65..d03a860 100644 --- a/plugins/modules/api_modify.py +++ b/plugins/modules/api_modify.py @@ -80,6 +80,8 @@ options: - interface sstp-server server - interface vlan - interface vrrp + - interface wireguard + - interface wireguard peers - interface wireless align - interface wireless cap - interface wireless sniffer