Commit 25a83c66 authored by Łukasz Nowak's avatar Łukasz Nowak

implemnet missing case.

parent 70f9bbf0
...@@ -184,7 +184,15 @@ def SlapDocument_migrateSlapState(self): ...@@ -184,7 +184,15 @@ def SlapDocument_migrateSlapState(self):
if explanation_delivery_line.getSimulationState() == 'cancelled': if explanation_delivery_line.getSimulationState() == 'cancelled':
state = 'destroyed' state = 'destroyed'
else: else:
raise NotImplementedError assert(explanation_delivery_line.getSimulationState() in ['ordered', 'confirmed'])
previous_workflow_state = self.workflow_history[
'software_instance_slap_interface_workflow'][-1]['slap_state']
if previous_workflow_state == 'start_requested':
state = 'started'
elif previous_workflow_state == 'stop_requested':
state = 'stopped'
else:
raise NotImplementedError("Previous state %r not supported" % previous_workflow_state)
promise_kw = { promise_kw = {
'instance_xml': slap_document.getTextContent(), 'instance_xml': slap_document.getTextContent(),
'software_type': slap_document.getSourceReference(), 'software_type': slap_document.getSourceReference(),
......
101 102
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment