diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-04-19 11:55:09 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-04-19 11:55:12 +0200 |
commit | 0e19d622a04100f7b6e53b3fe601873412609057 (patch) | |
tree | bcb4b82523233eabdde9ccb892b3c547b56c294b /python/vyos/util.py | |
parent | 0588c120b8c2041b60e83effe15303af1e1cdbef (diff) | |
download | vyos-1x-0e19d622a04100f7b6e53b3fe601873412609057.tar.gz vyos-1x-0e19d622a04100f7b6e53b3fe601873412609057.zip |
bridge: T2232: move helper to vyos.validate
Diffstat (limited to 'python/vyos/util.py')
-rw-r--r-- | python/vyos/util.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/python/vyos/util.py b/python/vyos/util.py index c70bff091..b1d95fbbf 100644 --- a/python/vyos/util.py +++ b/python/vyos/util.py @@ -429,24 +429,6 @@ def mac2eui64(mac, prefix=None): except: # pylint: disable=bare-except return -def is_bridge_member(interface): - """ - Checks if passed interfaces is part of a bridge device or not. - - Returns a tuple: - False, None -> Not part of a bridge - True, bridge-name -> If it is assigned to a bridge - """ - from vyos.config import Config - c = Config() - base = ['interfaces', 'bridge'] - for bridge in c.list_nodes(base): - members = c.list_nodes(base + [bridge, 'member', 'interface']) - if interface in members: - return (True, bridge) - - return False, None - def get_half_cpus(): """ return 1/2 of the numbers of available CPUs """ cpu = os.cpu_count() |