summaryrefslogtreecommitdiff
path: root/python/vyos/util.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-10-24 17:07:13 +0200
committerChristian Poessinger <christian@poessinger.com>2020-10-24 17:13:14 +0200
commit8c31bbe2af5e8209a2d2a10d3c803b67cc8bc5eb (patch)
tree9b1dcfb3dca68c7b6588750b692fa90cc8629813 /python/vyos/util.py
parent3aa70278b1697aab72aa6a5e1a9ac4aaad3acefe (diff)
downloadvyos-1x-8c31bbe2af5e8209a2d2a10d3c803b67cc8bc5eb.tar.gz
vyos-1x-8c31bbe2af5e8209a2d2a10d3c803b67cc8bc5eb.zip
vyos.util: drop obsolete function get_bridge_member_config()
Diffstat (limited to 'python/vyos/util.py')
-rw-r--r--python/vyos/util.py47
1 files changed, 0 insertions, 47 deletions
diff --git a/python/vyos/util.py b/python/vyos/util.py
index b5f0ea36e..9d87e777a 100644
--- a/python/vyos/util.py
+++ b/python/vyos/util.py
@@ -605,53 +605,6 @@ def ifname_from_config(conf):
# no vlans
return level[-1]
-def get_bridge_member_config(conf, br, intf):
- """
- Gets bridge port (member) configuration
-
- Arguments:
- conf: Config
- br: bridge name
- intf: interface name
-
- Returns:
- dict with the configuration
- False if bridge or bridge port doesn't exist
- """
- old_level = conf.get_level()
- conf.set_level([])
-
- bridge = f'interfaces bridge {br}'
- member = f'{bridge} member interface {intf}'
- if not ( conf.exists(bridge) and conf.exists(member) ):
- return False
-
- # default bridge port configuration
- # cost and priority initialized with linux defaults
- # by reading /sys/devices/virtual/net/br0/brif/eth2/{path_cost,priority}
- # after adding interface to bridge after reboot
- memberconf = {
- 'cost': 100,
- 'priority': 32,
- 'arp_cache_tmo': 30,
- 'disable_link_detect': 1,
- }
-
- if conf.exists(f'{member} cost'):
- memberconf['cost'] = int(conf.return_value(f'{member} cost'))
-
- if conf.exists(f'{member} priority'):
- memberconf['priority'] = int(conf.return_value(f'{member} priority'))
-
- if conf.exists(f'{bridge} ip arp-cache-timeout'):
- memberconf['arp_cache_tmo'] = int(conf.return_value(f'{bridge} ip arp-cache-timeout'))
-
- if conf.exists(f'{bridge} disable-link-detect'):
- memberconf['disable_link_detect'] = 2
-
- conf.set_level(old_level)
- return memberconf
-
def check_kmod(k_mod):
""" Common utility function to load required kernel modules on demand """
from vyos import ConfigError