summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig/wireguard.py
diff options
context:
space:
mode:
authorThomas Mangin <thomas.mangin@exa.net.uk>2020-03-24 18:14:49 +0000
committerThomas Mangin <thomas.mangin@exa.net.uk>2020-03-24 18:14:49 +0000
commit8a4dd6c2816bf2289ad4af37ba301b31efdf30a8 (patch)
tree5974407307b60984e2b1c71ecf949b1ca182c0f2 /python/vyos/ifconfig/wireguard.py
parent09f8e57535849aab83df6947fbe94a0e7228ed40 (diff)
downloadvyos-1x-8a4dd6c2816bf2289ad4af37ba301b31efdf30a8.tar.gz
vyos-1x-8a4dd6c2816bf2289ad4af37ba301b31efdf30a8.zip
ifconfig: T2057: add class Register
Diffstat (limited to 'python/vyos/ifconfig/wireguard.py')
-rw-r--r--python/vyos/ifconfig/wireguard.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/python/vyos/ifconfig/wireguard.py b/python/vyos/ifconfig/wireguard.py
index 71ee67c98..8cf1ff58c 100644
--- a/python/vyos/ifconfig/wireguard.py
+++ b/python/vyos/ifconfig/wireguard.py
@@ -22,10 +22,8 @@ from datetime import timedelta
import time
from hurry.filesize import size,alternative
+@Interface.register
class WireGuardIf(Interface):
- options = ['port', 'private-key', 'pubkey', 'psk',
- 'allowed-ips', 'fwmark', 'endpoint', 'keepalive']
-
default = {
'type': 'wireguard',
'port': 0,
@@ -37,6 +35,16 @@ class WireGuardIf(Interface):
'endpoint': None,
'keepalive': 0
}
+ definition = {
+ **Interface.definition,
+ **{
+ 'section': 'wireguard',
+ 'prefixes': ['wg', ],
+ 'bridgeable': True,
+ }
+ }
+ options = ['port', 'private-key', 'pubkey', 'psk',
+ 'allowed-ips', 'fwmark', 'endpoint', 'keepalive']
"""
Wireguard interface class, contains a comnfig dictionary since