- outputs = self._stack.outputs
- self.outputs = {output['output_key']: output['output_value'] for output
- in outputs}
- if self.uuid:
- _DEPLOYED_STACKS[self.uuid] = self._stack
+
+ self._update_stack_tracking()
+
+ def get_failures(self):
+ return event_utils.get_events(self._cloud, self._stack.id,
+ event_args={'resource_status': 'FAILED'})
+
+ def get(self):
+ """Retrieves an existing stack from the target cloud
+
+ Returns a bool indicating whether the stack exists in the target cloud
+ If the stack exists, it will be stored as self._stack
+ """
+ self._stack = self._cloud.get_stack(self.name)
+ if not self._stack:
+ return False
+
+ self._update_stack_tracking()
+ return True