diff options
author | Daniil Baturin <daniil@vyos.io> | 2024-04-04 15:09:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-04 15:09:55 +0200 |
commit | 7f077a0dfc410d974f891e34f0726809d4b1a5b1 (patch) | |
tree | 637bdf33a0e87ae735ecd3f19ab120863b3f30be /src/conf_mode/qos.py | |
parent | d729069c58c0a670e1f57d6d12c57a41e330742b (diff) | |
parent | ca84e6845e6cfeb5f4f5798594b390afb735901f (diff) | |
download | vyos-1x-7f077a0dfc410d974f891e34f0726809d4b1a5b1.tar.gz vyos-1x-7f077a0dfc410d974f891e34f0726809d4b1a5b1.zip |
Merge pull request #3241 from c-po/spring-cleaning-sagitta
T6199: spring cleaning - drop unused Python imports (backport #3240)
Diffstat (limited to 'src/conf_mode/qos.py')
-rwxr-xr-x | src/conf_mode/qos.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/conf_mode/qos.py b/src/conf_mode/qos.py index 2b4fcc1bf..3dfb4bab8 100755 --- a/src/conf_mode/qos.py +++ b/src/conf_mode/qos.py @@ -14,15 +14,14 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -import os - from sys import exit from netifaces import interfaces -from vyos.base import Warning from vyos.config import Config -from vyos.configdep import set_dependents, call_dependents +from vyos.configdep import set_dependents +from vyos.configdep import call_dependents from vyos.configdict import dict_merge +from vyos.configverify import verify_interface_exists from vyos.ifconfig import Section from vyos.qos import CAKE from vyos.qos import DropTail @@ -37,7 +36,6 @@ from vyos.qos import RoundRobin from vyos.qos import TrafficShaper from vyos.qos import TrafficShaperHFSC from vyos.utils.dict import dict_search_recursive -from vyos.utils.network import interface_exists from vyos.utils.process import run from vyos import ConfigError from vyos import airbag @@ -215,11 +213,10 @@ def apply(qos): return None for interface, interface_config in qos['interface'].items(): - if not interface_exists(interface): + if not verify_interface_exists(interface, warning_only=True): # When shaper is bound to a dialup (e.g. PPPoE) interface it is # possible that it is yet not availbale when to QoS code runs. - # Skip the configuration and inform the user - Warning(f'Interface "{interface}" does not exist!') + # Skip the configuration and inform the user via warning_only=True continue for direction in ['egress', 'ingress']: |