re-add batch support to cherrypy saltapi

This commit is contained in:
Christian McHugh 2017-04-12 22:07:15 +01:00 committed by rallytime
parent 6eec04b2db
commit e790930f5a

View file

@ -109,6 +109,20 @@ class NetapiClient(object):
local = salt.client.get_local_client(mopts=self.opts)
return local.cmd_subset(*args, **kwargs)
def local_batch(self, *args, **kwargs):
'''
Run :ref:`execution modules <all-salt.modules>` against batches of minions
.. versionadded:: 0.8.4
Wraps :py:meth:`salt.client.LocalClient.cmd_batch`
:return: Returns the result from the exeuction module for each batch of
returns
'''
local = salt.client.get_local_client(mopts=self.opts)
return local.cmd_batch(*args, **kwargs)
def ssh(self, *args, **kwargs):
'''
Run salt-ssh commands synchronously