summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-07-30 19:06:35 +0200
committerChristian Poessinger <christian@poessinger.com>2022-07-31 19:42:44 +0200
commit03e6b4e9cda0d9573afbd99bc356f7ff584d7809 (patch)
treeab8ae62aabbfc3e536a4436d098c7d20705824dc /python
parent4168e03721b2a9595de4090fddf1280d39ccce4c (diff)
downloadvyos-1x-03e6b4e9cda0d9573afbd99bc356f7ff584d7809.tar.gz
vyos-1x-03e6b4e9cda0d9573afbd99bc356f7ff584d7809.zip
Revert "vyos.configdict(): T4228: is_member() must split VLAN interfaces"
(cherry picked from commit 99ff0ac7d29a65466a0fe4a12ef1a42cce90ece0)
Diffstat (limited to 'python')
-rw-r--r--python/vyos/configdict.py20
1 files changed, 2 insertions, 18 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py
index 70e5cd889..cc50c5167 100644
--- a/python/vyos/configdict.py
+++ b/python/vyos/configdict.py
@@ -228,24 +228,8 @@ def is_member(conf, interface, intftype=None):
for intf in conf.list_nodes(base):
member = base + [intf, 'member', 'interface', interface]
if conf.exists(member):
- member_type = Section.section(interface)
- # Check if it's a VLAN (QinQ) interface
- interface = interface.split('.')
- if len(interface) == 3:
- if conf.exists(['interfaces', member_type, interface[0], 'vif-s', interface[1], 'vif-c', interface[2]]):
- tmp = conf.get_config_dict(['interfaces', member_type, interface[0]],
- key_mangling=('-', '_'), get_first_key=True)
- ret_val.update({intf : tmp})
- elif len(interface) == 2:
- if conf.exists(['interfaces', member_type, interface[0], 'vif', interface[1]]):
- tmp = conf.get_config_dict(['interfaces', member_type, interface[0]],
- key_mangling=('-', '_'), get_first_key=True)
- ret_val.update({intf : tmp})
- else:
- if conf.exists(['interfaces', member_type, interface[0]]):
- tmp = conf.get_config_dict(['interfaces', member_type, interface[0]],
- key_mangling=('-', '_'), get_first_key=True)
- ret_val.update({intf : tmp})
+ if conf.exists(['interfaces', Section.section(interface), interface]):
+ ret_val.update({intf : {}})
old_level = conf.set_level(old_level)
return ret_val