From 99ff0ac7d29a65466a0fe4a12ef1a42cce90ece0 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 30 Jul 2022 19:06:35 +0200 Subject: Revert "vyos.configdict(): T4228: is_member() must split VLAN interfaces" This reverts commit fdeae251431cb747e8f60d96269b4365b7401807. --- python/vyos/configdict.py | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py index a61666afc..e9ef39930 100644 --- a/python/vyos/configdict.py +++ b/python/vyos/configdict.py @@ -222,24 +222,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 : {}}) return ret_val -- cgit v1.2.3