"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "salt/matchers/nodegroup_match.py" between
salt-2019.2.0.tar.gz and salt-2019.2.1.tar.gz

About: SaltStack is a systems management software for data center automation, cloud orchestration, server provisioning, configuration management and more. Community version.

nodegroup_match.py  (salt-2019.2.0):nodegroup_match.py  (salt-2019.2.1)
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
''' '''
This is the default nodegroup matcher. This is the default nodegroup matcher.
''' '''
from __future__ import absolute_import, print_function, unicode_literals from __future__ import absolute_import, print_function, unicode_literals
import salt.utils.minions # pylint: disable=3rd-party-module-not-gated import salt.utils.minions # pylint: disable=3rd-party-module-not-gated
import salt.loader import salt.loader
import logging
def match(tgt, nodegroups): log = logging.getLogger(__name__)
def match(tgt, nodegroups=None, opts=None):
''' '''
This is a compatibility matcher and is NOT called when using This is a compatibility matcher and is NOT called when using
nodegroups for remote execution, but is called when the nodegroups nodegroups for remote execution, but is called when the nodegroups
matcher is used in states matcher is used in states
''' '''
if not opts:
opts = __opts__
if not nodegroups:
log.debug('Nodegroup matcher called with no nodegroups.')
return False
if tgt in nodegroups: if tgt in nodegroups:
matchers = salt.loader.matchers(__opts__) matchers = salt.loader.matchers(opts)
return matchers['compound_match.match']( return matchers['compound_match.match'](
salt.utils.minions.nodegroup_comp(tgt, nodegroups) salt.utils.minions.nodegroup_comp(tgt, nodegroups)
) )
return False return False
 End of changes. 4 change blocks. 
2 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)