From 11833cb069e0723b1395c28b64ce753a3a9acdec Mon Sep 17 00:00:00 2001 From: makkalot Date: Thu, 7 Aug 2008 15:26:17 +0300 Subject: the series of exporting the minion modules to UI command module --- func/minion/modules/command.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'func/minion/modules/command.py') diff --git a/func/minion/modules/command.py b/func/minion/modules/command.py index cc463cf..20a6ccf 100644 --- a/func/minion/modules/command.py +++ b/func/minion/modules/command.py @@ -42,3 +42,29 @@ class Command(func_module.FuncModule): if os.access(command, os.X_OK): return True return False + + def register_method_args(self): + """ + The argument export method + """ + #common type in both descriptions + command = { + 'type':'string', + 'optional':False, + 'description':'The command that is going to be used', + } + + return { + 'run':{ + 'args':{ + 'command':command + }, + 'description':'Run a specified command' + }, + 'exists':{ + 'args':{ + 'command':command + }, + 'description':'Check if specific command exists' + } + } -- cgit