From 31de01242a26dff8ff993061ea2f86102a8a7493 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Thu, 1 Aug 2024 19:00:30 -0500 Subject: T6632: add missing standard functions to config scripts --- src/conf_mode/interfaces_wireguard.py | 3 +++ src/conf_mode/system_acceleration.py | 3 +++ src/tests/test_configd_inspect.py | 3 +-- 3 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/conf_mode/interfaces_wireguard.py b/src/conf_mode/interfaces_wireguard.py index 0e0b77877..d7a638b51 100755 --- a/src/conf_mode/interfaces_wireguard.py +++ b/src/conf_mode/interfaces_wireguard.py @@ -103,6 +103,9 @@ def verify(wireguard): public_keys.append(peer['public_key']) +def generate(wireguard): + return None + def apply(wireguard): if 'rebuild_required' in wireguard or 'deleted' in wireguard: wg = WireGuardIf(**wireguard) diff --git a/src/conf_mode/system_acceleration.py b/src/conf_mode/system_acceleration.py index e4b248675..d2cf44ff0 100755 --- a/src/conf_mode/system_acceleration.py +++ b/src/conf_mode/system_acceleration.py @@ -79,6 +79,9 @@ def verify(qat): if not data: raise ConfigError('No QAT acceleration device found') +def generate(qat): + return + def apply(qat): # Shutdown VPN service which can use QAT if 'ipsec' in qat: diff --git a/src/tests/test_configd_inspect.py b/src/tests/test_configd_inspect.py index 98552c8f3..ccd631893 100644 --- a/src/tests/test_configd_inspect.py +++ b/src/tests/test_configd_inspect.py @@ -56,8 +56,7 @@ class TestConfigdInspect(TestCase): m = import_script(s) for i in f_list: f = getattr(m, i, None) - if not f: - continue + self.assertIsNotNone(f, f"'{s}': missing function '{i}'") sig = signature(f) par = sig.parameters l = len(par) -- cgit v1.2.3