diff options
| author | Adrian Likins <alikins@redhat.com> | 2008-08-20 13:36:47 -0400 |
|---|---|---|
| committer | Adrian Likins <alikins@redhat.com> | 2008-08-20 13:36:47 -0400 |
| commit | 82ed2583f2f9b2fe5ca89824340e12e8dbdef8ef (patch) | |
| tree | 21b503dcafc7871bae5f1ca69c3d28d60086ee14 /func/minion/modules/command.py | |
| parent | 4bd91c631f1d81daa416889b0521f95841a1a83a (diff) | |
| parent | a07ef03e52427fa26f8990031705a86fdd7c9291 (diff) | |
Merge branch 'master' of ssh://alikins@git.fedoraproject.org/git/hosted/func
Diffstat (limited to 'func/minion/modules/command.py')
| -rw-r--r-- | func/minion/modules/command.py | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/func/minion/modules/command.py b/func/minion/modules/command.py index cc463cf..b41dd9b 100644 --- a/func/minion/modules/command.py +++ b/func/minion/modules/command.py @@ -14,7 +14,7 @@ Abitrary command execution module for func. """ import func_module -import sub_process +from func.minion import sub_process class Command(func_module.FuncModule): @@ -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' + } + } |
