Skip to content

Commit

Permalink
cloud.clouds.ec2: cache each named node (#33164)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfindlay authored and Mike Place committed May 12, 2016
1 parent 86db5df commit b3805d8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions salt/cloud/clouds/ec2.py
Expand Up @@ -2622,7 +2622,11 @@ def queue_instances(instances):
'''
for instance_id in instances:
node = _get_node(instance_id=instance_id)
salt.utils.cloud.cache_node(node, __active_provider_name__, __opts__)
for name in node:
if instance_id == node[name]['instanceId']:
salt.utils.cloud.cache_node(node[name],
__active_provider_name__,
__opts__)


def create_attach_volumes(name, kwargs, call=None, wait_to_finish=True):
Expand Down Expand Up @@ -3168,7 +3172,10 @@ def show_instance(name=None, instance_id=None, call=None, kwargs=None):
)

node = _get_node(name=name, instance_id=instance_id)
salt.utils.cloud.cache_node(node, __active_provider_name__, __opts__)
for name in node:
salt.utils.cloud.cache_node(node[name],
__active_provider_name__,
__opts__)
return node


Expand Down

0 comments on commit b3805d8

Please sign in to comment.