Commit 258a1ced authored by Romain Courteaud's avatar Romain Courteaud

destroyComputerPartition transition has been removed

parent 4d8e1fe1
...@@ -778,10 +778,18 @@ class SlapTool(BaseTool): ...@@ -778,10 +778,18 @@ class SlapTool(BaseTool):
""" """
Reports that Computer Partition is destroyed Reports that Computer Partition is destroyed
""" """
software_instance = self._getSoftwareInstanceForComputerPartition( instance = self._getSoftwareInstanceForComputerPartition(
computer_id, computer_id,
computer_partition_id) computer_partition_id)
return software_instance.destroyComputerPartition() delivery = instance.getCausalityValue(portal_type=["Sale Packing List"])
if delivery is not None:
portal = self.getPortalObject()
line = delivery.contentValues(portal_type="Sale Packing List Line")[0]
if line.getResource() in [
portal.portal_preferences.getPreferredInstanceCleanupResource()]:
if portal.portal_workflow.isTransitionPossible(delivery, 'stop'):
delivery.stop()
delivery.deliver()
@convertToREST @convertToREST
def _setComputerPartitionConnectionXml(self, computer_id, def _setComputerPartitionConnectionXml(self, computer_id,
......
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