plugins: made class methods from get_config_options* methods
They were intended to be class methods and that's why there were defined with the 'cls' parameter, but they actually weren't class methods. Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
parent
14b8d3ff40
commit
60f9e1e217
13 changed files with 15 additions and 0 deletions
|
|
@ -43,10 +43,12 @@ class Plugin(object):
|
|||
# Plugin configuration manipulation and helpers.
|
||||
#
|
||||
|
||||
@classmethod
|
||||
def _get_config_options(self):
|
||||
"""Default configuration options for the plugin."""
|
||||
return {}
|
||||
|
||||
@classmethod
|
||||
def _get_config_options_used_by_dynamic(self):
|
||||
"""List of config options used by dynamic tuning. Their previous values will be automatically saved and restored."""
|
||||
return []
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ class AudioPlugin(base.Plugin):
|
|||
except:
|
||||
return None
|
||||
|
||||
@classmethod
|
||||
def _get_config_options(cls):
|
||||
return {
|
||||
"timeout": 0,
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ class BootloaderPlugin(base.Plugin):
|
|||
def _instance_cleanup(self, instance):
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def _get_config_options(cls):
|
||||
return {
|
||||
"grub2_cfg_file": None,
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ class CPULatencyPlugin(base.Plugin):
|
|||
self._assigned_devices = set()
|
||||
self._free_devices = self._devices.copy()
|
||||
|
||||
@classmethod
|
||||
def _get_config_options(self):
|
||||
return {
|
||||
"load_threshold" : 0.2,
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ class DiskPlugin(hotplug.Plugin):
|
|||
instance._load_monitor.remove_device(device_name)
|
||||
super(self.__class__, self)._removed_device_unapply_tuning(instance, device_name)
|
||||
|
||||
@classmethod
|
||||
def _get_config_options(cls):
|
||||
return {
|
||||
"dynamic" : True, # FIXME: do we want this default?
|
||||
|
|
@ -71,6 +72,7 @@ class DiskPlugin(hotplug.Plugin):
|
|||
"scheduler_quantum" : None,
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def _get_config_options_used_by_dynamic(cls):
|
||||
return [
|
||||
"apm",
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ class EeePCSHEPlugin(base.Plugin):
|
|||
raise exceptions.NotSupportedPluginException("Plugin is not supported on your hardware.")
|
||||
super(self.__class__, self).__init__(*args, **kwargs)
|
||||
|
||||
@classmethod
|
||||
def _get_config_options(self):
|
||||
return {
|
||||
"load_threshold_normal" : 0.6,
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ class MountsPlugin(base.Plugin):
|
|||
self._assigned_devices = set()
|
||||
self._free_devices = self._devices.copy()
|
||||
|
||||
@classmethod
|
||||
def _get_config_options(self):
|
||||
return {
|
||||
"disable_barriers": None,
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ class NetTuningPlugin(base.Plugin):
|
|||
log.debug("%s load: read %0.2f, write %0.2f" % (device, stats["read"], stats["write"]))
|
||||
log.debug("%s idle: read %d, write %d, level %d" % (device, idle["read"], idle["write"], idle["level"]))
|
||||
|
||||
@classmethod
|
||||
def _get_config_options(cls):
|
||||
return {
|
||||
"wake_on_lan": None,
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ class ScriptPlugin(base.Plugin):
|
|||
Plugin for running custom scripts with profile activation and deactivation.
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
def _get_config_options(self):
|
||||
return {
|
||||
"script" : None,
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ class SelinuxPlugin(base.Plugin):
|
|||
self._cache_threshold_path = os.path.join(self._selinux_path, "avc", "cache_threshold")
|
||||
super(self.__class__, self).__init__(*args, **kwargs)
|
||||
|
||||
@classmethod
|
||||
def _get_config_options(self):
|
||||
return {
|
||||
"avc_cache_threshold" : None,
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ class USBPlugin(base.Plugin):
|
|||
self._free_devices = self._devices.copy()
|
||||
self._cmd = commands()
|
||||
|
||||
@classmethod
|
||||
def _get_config_options(self):
|
||||
return {
|
||||
"autosuspend" : None,
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ class VideoPlugin(base.Plugin):
|
|||
self._free_devices = self._devices.copy()
|
||||
self._cmd = commands()
|
||||
|
||||
@classmethod
|
||||
def _get_config_options(self):
|
||||
return {
|
||||
"radeon_powersave" : None,
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ class VMPlugin(base.Plugin):
|
|||
Plugin for tuning memory management.
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
def _get_config_options(self):
|
||||
return {
|
||||
"transparent_hugepages" : None,
|
||||
|
|
|
|||
Loading…
Reference in a new issue