mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
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:
parent
29cf438d3c
commit
63e28ba358
@ -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):
|
||||
'''
|
||||
|
Loading…
Reference in New Issue
Block a user