Revert "Just use ckminions in batch mode."

This reverts commit 6c5f3f8d2e.

We can't use ckminions since it is a gauranteed superset (not the exact set)
This commit is contained in:
Thomas Jackson 2015-04-03 15:37:44 -07:00
parent 29cf438d3c
commit 63e28ba358

View File

@ -12,7 +12,6 @@ import copy
# Import salt libs
import salt.client
import salt.output
import salt.utils.minions
from salt.utils import print_cli
@ -31,13 +30,26 @@ class Batch(object):
'''
Return a list of minions to use for the batch run
'''
ckminions = salt.utils.minions.CkMinions(self.opts)
args = [self.opts['tgt'],
'test.ping',
[],
self.opts['timeout'],
]
selected_target_option = self.opts.get('selected_target_option', None)
if selected_target_option is not None:
expr_form = selected_target_option
args.append(selected_target_option)
else:
expr_form = self.opts.get('expr_form', 'glob')
return ckminions.check_minions(self.opts['tgt'], expr_form=expr_form)
args.append(self.opts.get('expr_form', 'glob'))
fret = []
for ret in self.local.cmd_iter(*args, **self.eauth):
for minion in ret:
if not self.quiet:
print_cli('{0} Detected for this batch run'.format(minion))
fret.append(minion)
# Returns <type 'list'>
return sorted(frozenset(fret))
def get_bnum(self):
'''