summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig/wireless.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-09-20 15:18:50 +0200
committerChristian Poessinger <christian@poessinger.com>2020-09-20 15:18:50 +0200
commit103e8404cdea70dad486940f209b9683f1c7b936 (patch)
treee8f18c41978d0dbb05ed9b61fe2db62402a809d3 /python/vyos/ifconfig/wireless.py
parent993f6873c02f3f79013acedfe61ce705bdb3a4d0 (diff)
downloadvyos-1x-103e8404cdea70dad486940f209b9683f1c7b936.tar.gz
vyos-1x-103e8404cdea70dad486940f209b9683f1c7b936.zip
ifconfig: T2653: remove duplicates of get_config()
A lot of derived classes from Interface implemented their own get_config() method which more or less was the same everywhere. We also hat different qualifiers like @staticmethod or @classmethod. This is now changed to only have the @classmethod in Interface base class which will return the necessary dictionary keys for the required interfaces. This change is a mid reduction in lines of code which is always a very nice thing!
Diffstat (limited to 'python/vyos/ifconfig/wireless.py')
-rw-r--r--python/vyos/ifconfig/wireless.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/python/vyos/ifconfig/wireless.py b/python/vyos/ifconfig/wireless.py
index 346577119..37703d242 100644
--- a/python/vyos/ifconfig/wireless.py
+++ b/python/vyos/ifconfig/wireless.py
@@ -50,22 +50,6 @@ class WiFiIf(Interface):
.format(**self.config)
self._cmd(cmd)
- @staticmethod
- def get_config():
- """
- WiFi interfaces require a configuration when they are added using
- iw (type/phy). This static method will provide the configuration
- ictionary used by this class.
-
- Example:
- >> conf = WiFiIf().get_config()
- """
- config = {
- 'phy': 'phy0'
- }
- return config
-
-
def update(self, config):
""" General helper function which works on a dictionary retrived by
get_config_dict(). It's main intention is to consolidate the scattered