plugins: create skelet for rfkill base class
This commit is contained in:
parent
d91a90a8ad
commit
21e2d51b50
1 changed files with 28 additions and 0 deletions
28
tuned/plugins/rfkill.py
Normal file
28
tuned/plugins/rfkill.py
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import tuned.plugins
|
||||
import tuned.log
|
||||
from tuned.utils.commands import *
|
||||
|
||||
log = tuned.log.get()
|
||||
|
||||
class RFKillPlugin(tuned.plugins.Plugin):
|
||||
"""
|
||||
Base class for plugins which can be enabled/disabled using rfkill.
|
||||
"""
|
||||
|
||||
#
|
||||
# TODO: ticket #25
|
||||
#
|
||||
|
||||
@classmethod
|
||||
def _get_default_options(cls):
|
||||
return {
|
||||
"disable" : None,
|
||||
}
|
||||
|
||||
@command_set("disable", per_device=True)
|
||||
def _set_disabled(self, value, device):
|
||||
log.warn("RF killing is not implemented, ticket #25")
|
||||
|
||||
@command_get("disable")
|
||||
def _get_disabled(self, device):
|
||||
return False
|
||||
Loading…
Reference in a new issue