summaryrefslogtreecommitdiffstats
path: root/func/minion/modules/command.py
diff options
context:
space:
mode:
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 3d23e49..25a1aab 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):
@@ -47,3 +47,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'
+ }
+ }