From e6558a535594c1cd25133979f07663cf6958ce75 Mon Sep 17 00:00:00 2001 From: khramshinr Date: Thu, 14 Nov 2024 10:25:38 +0800 Subject: T6801: QoS: Policy rate-control is broken by default - Fixed unhandled exception for policy rate-control without params --- src/conf_mode/qos.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/conf_mode/qos.py') diff --git a/src/conf_mode/qos.py b/src/conf_mode/qos.py index 7dfad3180..a4d5f44e7 100755 --- a/src/conf_mode/qos.py +++ b/src/conf_mode/qos.py @@ -255,6 +255,9 @@ def verify(qos): if policy_type in ['priority_queue']: if 'default' not in policy_config: raise ConfigError(f'Policy {policy} misses "default" class!') + if policy_type in ['rate_control']: + if 'bandwidth' not in policy_config: + raise ConfigError('Bandwidth not defined') if 'default' in policy_config: if 'bandwidth' not in policy_config['default'] and policy_type not in ['priority_queue', 'round_robin', 'shaper_hfsc']: raise ConfigError('Bandwidth not defined for default traffic!') -- cgit v1.2.3