summaryrefslogtreecommitdiff
path: root/python/vyos/validate.py
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2020-07-26 14:06:31 +0300
committerDaniil Baturin <daniil@vyos.io>2020-07-26 14:06:31 +0300
commit5f78e67c746e9357cbb59fe066c2b32f34bc92ae (patch)
tree7a392c617c7a008f134a676436eb29eda24c98a4 /python/vyos/validate.py
parent9578890e1e4dc31da7387a6ad810d2efb22391e7 (diff)
parent675942ce3e2329a0122da189cd5944df08d7fcab (diff)
downloadvyos-1x-5f78e67c746e9357cbb59fe066c2b32f34bc92ae.tar.gz
vyos-1x-5f78e67c746e9357cbb59fe066c2b32f34bc92ae.zip
Merge branch 'current' of https://github.com/vyos/vyos-1x into current
Diffstat (limited to 'python/vyos/validate.py')
-rw-r--r--python/vyos/validate.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/python/vyos/validate.py b/python/vyos/validate.py
index a0620e4dd..ceeb6888a 100644
--- a/python/vyos/validate.py
+++ b/python/vyos/validate.py
@@ -279,7 +279,6 @@ def is_member(conf, interface, intftype=None):
False -> interface type cannot have members
"""
ret_val = None
-
if intftype not in ['bonding', 'bridge', None]:
raise ValueError((
f'unknown interface type "{intftype}" or it cannot '
@@ -292,9 +291,9 @@ def is_member(conf, interface, intftype=None):
conf.set_level([])
for it in intftype:
- base = 'interfaces ' + it
+ base = ['interfaces', it]
for intf in conf.list_nodes(base):
- memberintf = [base, intf, 'member', 'interface']
+ memberintf = base + [intf, 'member', 'interface']
if xml.is_tag(memberintf):
if interface in conf.list_nodes(memberintf):
ret_val = intf