Merge "Use flow_uuid and flow_name from storage"

This commit is contained in:
Jenkins
2014-07-06 21:41:52 +00:00
committed by Gerrit Code Review

View File

@@ -144,20 +144,12 @@ class ActionEngine(base.EngineBase):
if not states.check_flow_transition(old_state, state): if not states.check_flow_transition(old_state, state):
return return
self.storage.set_flow_state(state) self.storage.set_flow_state(state)
try: details = {
flow_uuid = self._flow.uuid 'engine': self,
except AttributeError: 'flow_name': self.storage.flow_name,
# NOTE(harlowja): if the flow was just a single task, then it 'flow_uuid': self.storage.flow_uuid,
# will not itself have a uuid, but the constructed flow_detail 'old_state': old_state,
# will. }
if self._flow_detail is not None:
flow_uuid = self._flow_detail.uuid
else:
flow_uuid = None
details = dict(engine=self,
flow_name=self._flow.name,
flow_uuid=flow_uuid,
old_state=old_state)
self.notifier.notify(state, details) self.notifier.notify(state, details)
def _ensure_storage(self): def _ensure_storage(self):