summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormakkalot <makkalot@gmail.com>2008-08-08 13:09:40 +0300
committermakkalot <makkalot@gmail.com>2008-08-08 13:09:40 +0300
commit2a4f3b749a40cc3dbd786b7348dc9961423fe0b2 (patch)
treed9e43894b9fb2529100e0f8511be8626a137680b
parenta35bf3cdb7070c3c5c696cb9465d530a23a1dd2c (diff)
downloadfunc-2a4f3b749a40cc3dbd786b7348dc9961423fe0b2.tar.gz
func-2a4f3b749a40cc3dbd786b7348dc9961423fe0b2.tar.xz
func-2a4f3b749a40cc3dbd786b7348dc9961423fe0b2.zip
export the sysctl module
-rw-r--r--func/minion/modules/sysctl.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/func/minion/modules/sysctl.py b/func/minion/modules/sysctl.py
index 1f11d55..36b5605 100644
--- a/func/minion/modules/sysctl.py
+++ b/func/minion/modules/sysctl.py
@@ -29,3 +29,41 @@ class SysctlModule(func_module.FuncModule):
def set(self, name, value):
return self.__run("/sbin/sysctl -w %s=%s" % (name, value))
+
+ def register_method_args(self):
+ """
+ Implementing the method argument getter
+ """
+
+ return {
+ 'list':{
+ 'args':{},
+ 'description':"Display all values currently available."
+ },
+ 'get':{
+ 'args':{
+ 'name':{
+ 'type':'string',
+ 'optional':False,
+ 'description':"The name of a key to read from. An example is kernel.ostype"
+ }
+ },
+ 'description':"Use this option to disable printing of the key name when printing values"
+ },
+ 'set':{
+ 'args':{
+ 'name':{
+ 'type':'string',
+ 'optional':False,
+ 'description':"The name of a key to read from. An example is kernel.ostype"
+ },
+ 'value':{
+ 'type':'string',
+ 'optional':False,
+ 'description':"The name value to be set."
+ }
+
+ },
+ 'description':"Use this option when you want to change a sysctl setting"
+ }
+ }