diff options
author | makkalot <makkalot@gmail.com> | 2008-08-11 14:48:30 +0300 |
---|---|---|
committer | makkalot <makkalot@gmail.com> | 2008-08-11 14:48:30 +0300 |
commit | d909c4909b3fa49e7b6ab94db940030f3c2fa95a (patch) | |
tree | 1b029ac348d101e18b12f30e1bcff479b070c6c7 | |
parent | 7cba338361b81c31793458fdf8cb666ef3ac89dd (diff) | |
download | func-d909c4909b3fa49e7b6ab94db940030f3c2fa95a.tar.gz func-d909c4909b3fa49e7b6ab94db940030f3c2fa95a.tar.xz func-d909c4909b3fa49e7b6ab94db940030f3c2fa95a.zip |
export reboot module
-rw-r--r-- | func/minion/modules/reboot.py | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/func/minion/modules/reboot.py b/func/minion/modules/reboot.py index c4fb275..70a4db0 100644 --- a/func/minion/modules/reboot.py +++ b/func/minion/modules/reboot.py @@ -9,7 +9,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. import func_module -import sub_process +from func.minion import sub_process class Reboot(func_module.FuncModule): @@ -19,3 +19,28 @@ class Reboot(func_module.FuncModule): def reboot(self, when='now', message=''): return sub_process.call(["/sbin/shutdown", '-r', when, message]) + + def register_method_args(self): + """ + Implementing method getter part + """ + + return { + 'reboot':{ + 'args':{ + 'when':{ + 'type':'string', + 'optional':True, + 'default':'now', + 'description':"When to reboot (optional)" + }, + 'message':{ + 'type':'string', + 'optional':True, + 'description':"The shutdown message" + } + }, + 'description':"Rebooting the minions" + } + } + |