summaryrefslogtreecommitdiff
path: root/python/vyos/ifconfig/section.py
diff options
context:
space:
mode:
authorThomas Mangin <thomas.mangin@exa.net.uk>2020-04-12 01:45:07 +0100
committerThomas Mangin <thomas.mangin@exa.net.uk>2020-04-12 10:19:56 +0100
commitbf39fe03e132ae4cf0985432345b61f6e7af2135 (patch)
tree61546fb468d9edfe57ef4797fdcc921fdac789ef /python/vyos/ifconfig/section.py
parent23225b31139e3f45cced5041d6d230909bb9e3d6 (diff)
downloadvyos-1x-bf39fe03e132ae4cf0985432345b61f6e7af2135.tar.gz
vyos-1x-bf39fe03e132ae4cf0985432345b61f6e7af2135.zip
ifconfig: T31: add skeleton VTI and input classes
also add a function to Section which provides a list of reserved names
Diffstat (limited to 'python/vyos/ifconfig/section.py')
-rw-r--r--python/vyos/ifconfig/section.py19
1 files changed, 8 insertions, 11 deletions
diff --git a/python/vyos/ifconfig/section.py b/python/vyos/ifconfig/section.py
index 234c9a6cc..ab340d247 100644
--- a/python/vyos/ifconfig/section.py
+++ b/python/vyos/ifconfig/section.py
@@ -66,12 +66,6 @@ class Section:
"""
name = cls._basename(name, vlan)
- # XXX: To leave as long as vti and input are not moved to vyos
- if name == 'vti':
- return 'vti'
- if name == 'ifb':
- return 'input'
-
if name in cls._prefixes:
return cls._prefixes[name].definition['section']
return ''
@@ -91,11 +85,6 @@ class Section:
interfaces = netifaces.interfaces()
for ifname in interfaces:
- # XXX: Temporary hack as vti and input are not yet moved from vyatta to vyos
- if ifname.startswith('vti') or ifname.startswith('input'):
- yield ifname
- continue
-
ifsection = cls.section(ifname)
if not ifsection:
continue
@@ -132,3 +121,11 @@ class Section:
bondable, broadcast, bridgeable, ...
"""
return list(cls._intf_with_feature(feature))
+
+ @classmethod
+ def reserved(cls):
+ """
+ return list with the interface name prefixes
+ eth, lo, vxlan, dum, ...
+ """
+ return list(cls._prefixes.keys())