summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig/wireless.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/wireless.py
parent09f8e57535849aab83df6947fbe94a0e7228ed40 (diff)
downloadvyos-1x-8a4dd6c2816bf2289ad4af37ba301b31efdf30a8.tar.gz
vyos-1x-8a4dd6c2816bf2289ad4af37ba301b31efdf30a8.zip
ifconfig: T2057: add class Register
Diffstat (limited to 'python/vyos/ifconfig/wireless.py')
-rw-r--r--python/vyos/ifconfig/wireless.py26
1 files changed, 24 insertions, 2 deletions
diff --git a/python/vyos/ifconfig/wireless.py b/python/vyos/ifconfig/wireless.py
index 7f507ff6e..f94509c80 100644
--- a/python/vyos/ifconfig/wireless.py
+++ b/python/vyos/ifconfig/wireless.py
@@ -15,19 +15,29 @@
import os
+from vyos.ifconfig.interface import Interface
from vyos.ifconfig.vlan import VLANIf
+
+@Interface.register
class WiFiIf(VLANIf):
"""
Handle WIFI/WLAN interfaces.
"""
- options = ['phy', 'op_mode']
-
default = {
'type': 'wifi',
'phy': 'phy0'
}
+ definition = {
+ **Interface.definition,
+ **{
+ 'section': 'wireless',
+ 'prefixes': ['wlan', ],
+ 'bridgeable': True,
+ }
+ }
+ options = ['phy', 'op_mode']
def _create(self):
# all interfaces will be added in monitor mode
@@ -54,3 +64,15 @@ class WiFiIf(VLANIf):
'phy': 'phy0'
}
return config
+
+
+
+@Interface.register
+class WiFiModemIf(WiFiIf):
+ definition = {
+ **WiFiIf.definition,
+ **{
+ 'section': 'wirelessmodem',
+ 'prefixes': ['wlm', ],
+ }
+ }