diff options
author | makkalot <makkalot@gmail.com> | 2008-06-02 19:30:12 +0300 |
---|---|---|
committer | makkalot <makkalot@gmail.com> | 2008-06-02 19:30:12 +0300 |
commit | 871aae17edf1f0e45ad8075016bde1ba5f68e969 (patch) | |
tree | 90a83f9d7a840aa1f5cf48ec1c71ec41e97dff35 /func | |
parent | 7388fc3e74711c5a9a788e96a02d7daa063ba9d4 (diff) | |
download | func-871aae17edf1f0e45ad8075016bde1ba5f68e969.tar.gz func-871aae17edf1f0e45ad8075016bde1ba5f68e969.tar.xz func-871aae17edf1f0e45ad8075016bde1ba5f68e969.zip |
implement the current options for service module to see if it works
Diffstat (limited to 'func')
-rw-r--r-- | func/minion/modules/service.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/func/minion/modules/service.py b/func/minion/modules/service.py index 062aea5..a4e8bea 100644 --- a/func/minion/modules/service.py +++ b/func/minion/modules/service.py @@ -86,3 +86,29 @@ class Service(func_module.FuncModule): tokens = line.split() results.append((tokens[0], tokens[-1].replace("...",""))) return results + + def __register_method_args(self): + """ + Implementing the argument getter + """ + + #service_name options they are same so use only one + service_name = { + 'type':'string', + 'description':'The name of the running services', + 'validator':'^[a-z]+$'} + + return { + 'get_running':{}, + 'get_enabled':{}, + 'inventory':{}, + 'status':{ + 'service_name':service_name, + }, + 'reload':{'service_name':service_name}, + 'restart':{'service_name':service_name}, + 'stop':{'service_name':service_name}, + 'start':{'service_name':service_name}, + + + } |