Skip to content

Commit

Permalink
Remove limitations on validation types for eauth targets
Browse files Browse the repository at this point in the history
When validate_tgt() was written, we did not have a CkMinions class nor
did we have a method of pre-matching minions. Therefore, only certain
match types were permitted.

This commit removes that limitation, allowing eauth targets to be
pillar, ipcidr, etc.

Fixes #30761.
  • Loading branch information
terminalmage committed Mar 1, 2016
1 parent 77d9aae commit 5dedaa2
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions salt/utils/minions.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,14 +646,6 @@ def validate_tgt(self, valid, expr, expr_form):
'E': 'pcre',
'N': 'node',
None: 'glob'}
infinite = [
'node',
'ipcidr',
'pillar',
'pillar_pcre']
if not self.opts.get('minion_data_cache', False):
infinite.append('grain')
infinite.append('grain_pcre')

target_info = parse_target(valid)
if not target_info:
Expand All @@ -662,12 +654,6 @@ def validate_tgt(self, valid, expr, expr_form):
v_matcher = ref.get(target_info['engine'])
v_expr = target_info['pattern']

if v_matcher in infinite:
# We can't be sure what the subset is, only match the identical
# target
if v_matcher != expr_form:
return False
return v_expr == expr
v_minions = set(self.check_minions(v_expr, v_matcher))
minions = set(self.check_minions(expr, expr_form))
d_bool = not bool(minions.difference(v_minions))
Expand Down

0 comments on commit 5dedaa2

Please sign in to comment.