summaryrefslogtreecommitdiffstats
path: root/func/minion/modules/command.py
diff options
context:
space:
mode:
authormakkalot <makkalot@gmail.com>2008-08-20 12:05:51 +0300
committermakkalot <makkalot@gmail.com>2008-08-20 12:05:51 +0300
commita07ef03e52427fa26f8990031705a86fdd7c9291 (patch)
tree94a805c7f373ba706d980becf279c2855e55efd2 /func/minion/modules/command.py
parent4005973a517189036a98175f61ae1006914ef323 (diff)
parentcc10cfa9b4e39e901128749cf034d64c4db47ad7 (diff)
Merge branch 'export_methods'
Diffstat (limited to 'func/minion/modules/command.py')
-rw-r--r--func/minion/modules/command.py28
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'
+ }
+ }