diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-11-08 19:53:38 +0100 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2026-11-08 19:53:38 +0100 |
| commit | 8abbd77a9fbaf75b7fc8002385d444acf56726b6 (patch) | |
| tree | 3b5661783ed65edb0c78137443a9a272bcf34863 /python | |
| parent | c66aaba4bc73b9b4fac943009212c27f567795d6 (diff) | |
| download | vyos-1x-8abbd77a9fbaf75b7fc8002385d444acf56726b6.tar.gz vyos-1x-8abbd77a9fbaf75b7fc8002385d444acf56726b6.zip | |
wwan: T9388: import the WWAN route helpers only where they are used
The configuration dictionary helpers are imported by nearly every
configuration script, but only the collection of WWAN default routes
needs the WWAN helpers and the XML default values. Import them there
instead of at module level.
Diffstat (limited to 'python')
| -rw-r--r-- | python/vyos/configdict.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py index a623e419b..359315ba3 100644 --- a/python/vyos/configdict.py +++ b/python/vyos/configdict.py @@ -23,8 +23,6 @@ from vyos.config import Config from vyos.config import ConfigDict from vyos.utils.dict import dict_search from vyos.utils.process import cmdl -from vyos.utils.wwan import bearer_families -from vyos.xml_ref import default_value def retrieve_config(path_hash, base_path, config): """ @@ -487,6 +485,9 @@ def get_wwan_interfaces(conf, vrf=None): """Common helper function to retrieve all WWAN interfaces from the current CLI session that can get an address from the bearer of their modem and thus contribute a default route.""" + from vyos.utils.wwan import bearer_families + from vyos.xml_ref import default_value + wwan_interfaces = {} conf.set_level([]) # required for list_nodes() for ifname in conf.list_nodes(['interfaces', 'wwan']): |
