do not collide with builtin name `list`

it was really just a fancier formatted status anyway
This commit is contained in:
Jakub Vysoky 2013-01-22 13:43:52 +01:00
parent 8bc3504547
commit a0770d5da7
2 changed files with 4 additions and 4 deletions

View File

@ -102,7 +102,7 @@ def update(user=None):
ret = __salt__['cmd.run_all'](_ctl_cmd('update', None), runas=user)
return _get_return(ret)
def list(name=None, user=None):
def status(name=None, user=None):
'''
List programms and its state
@ -110,7 +110,7 @@ def list(name=None, user=None):
salt '*' supervisord.list
'''
all_process = {}
for line in status(name, user).splitlines():
for line in status_raw(name, user).splitlines():
if len(line.split()) > 2:
process, state, reason = line.split(None, 2)
else:
@ -118,7 +118,7 @@ def list(name=None, user=None):
all_process[process] = {'state': state, 'reason': reason}
return all_process
def status(name=None, user=None):
def status_raw(name=None, user=None):
ret = __salt__['cmd.run_all'](_ctl_cmd('status', name), runas=user)
return _get_return(ret)

View File

@ -54,7 +54,7 @@ def running(name,
'''
ret = {'name': name, 'result': True, 'comment': '', 'changes': {}}
all_processes = __salt__['supervisord.list'](user=runas)
all_processes = __salt__['supervisord.status'](user=runas)
needs_update = name not in all_processes
if __opts__['test']: