Merge pull request #10794 from topochan/patch-1

fix issue #10791
This commit is contained in:
Thomas S Hatch 2014-02-26 15:42:01 -07:00
commit f104bc786b

View File

@ -25,7 +25,7 @@ def __virtual__():
return False
def _execute_cmd(plugin, args='', run_type='cmd.retcode', key_name=None):
def _execute_cmd(plugin, args='', run_type='cmd.retcode'):
'''
Execute nagios plugin if it's in the directory with salt command specified in run_type
'''
@ -88,7 +88,7 @@ def run(plugin, args='', key_name=None):
Run nagios plugin and return all the data execution with cmd.run
'''
data = _execute_cmd(plugin, args, 'cmd.run', key_name)
data = _execute_cmd(plugin, args, 'cmd.run')
return data
@ -112,7 +112,7 @@ def retcode(plugin, args='', key_name=None):
data[key_name] = {}
status = _execute_cmd(plugin, args, 'cmd.retcode', key_name)
status = _execute_cmd(plugin, args, 'cmd.retcode')
data[key_name]['status'] = status
return data
@ -122,7 +122,7 @@ def run_all(plugin, args='', key_name=None):
'''
Run nagios plugin and return all the data execution with cmd.run_all
'''
data = _execute_cmd(plugin, args, 'cmd.run_all', key_name)
data = _execute_cmd(plugin, args, 'cmd.run_all')
return data