Need to expand variables before calling the @command function. This is actually done for _execute_all[_non]_device_commands and _verify_all_non_device_commands, but not in _verify_all_device_commands. This adds the missing expansion. (cherry picked from commit 225f47f83f5c21c88dd06c74b1493b14eced4968)
26 lines
919 B
Diff
26 lines
919 B
Diff
From 48a01d08ea325354c37b8f68c02c28fa424ddff6 Mon Sep 17 00:00:00 2001
|
|
From: Adriaan Schmidt <adriaan.schmidt@siemens.com>
|
|
Date: Fri, 20 Sep 2024 09:01:54 +0800
|
|
Subject: [PATCH] fix:expand variables in Plugin._verify_all_device_commands
|
|
|
|
---
|
|
tuned/plugins/base.py | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/tuned/plugins/base.py b/tuned/plugins/base.py
|
|
index 784d44d..c43cbb6 100644
|
|
--- a/tuned/plugins/base.py
|
|
+++ b/tuned/plugins/base.py
|
|
@@ -452,7 +452,7 @@ class Plugin(object):
|
|
def _verify_all_device_commands(self, instance, devices, ignore_missing):
|
|
ret = True
|
|
for command in [command for command in list(self._commands.values()) if command["per_device"]]:
|
|
- new_value = instance.options.get(command["name"], None)
|
|
+ new_value = self._variables.expand(instance.options.get(command["name"], None))
|
|
if new_value is None:
|
|
continue
|
|
for device in devices:
|
|
--
|
|
2.43.0
|
|
|