cloud roster: Check whether show_instance succeeded on node

If the show_instance action failed on a node, the node's name would be
added to a list located at 'Not Actioned/Not Running' key of a
dictionary returned by the action. Ensure that a target node isn't
included into that list.
This commit is contained in:
Sergei Zviagintsev 2017-03-21 17:03:26 +01:00
parent 1b45c8e8c2
commit a6865e0283

View file

@ -62,6 +62,10 @@ def targets(tgt, tgt_type='glob', **kwargs): # pylint: disable=W0613
if not info:
return {}
not_actioned = info.get('Not Actioned/Not Running')
if not_actioned and tgt in not_actioned:
return {}
provider = indexed_minion.get('provider', None)
profile = indexed_minion.get('profile', None)
driver = indexed_minion.get('driver', None)