Commit e6456daa authored by Antoine Catton's avatar Antoine Catton

Modify HostingSubscription_requestRootSoftwareInstance in order to avoid...

Modify HostingSubscription_requestRootSoftwareInstance in order to avoid starting/stopping a destroyed computer partition.
parent ace62d1f
...@@ -115,6 +115,17 @@ else:\n ...@@ -115,6 +115,17 @@ else:\n
sla_xml=context.getSlaXml(),\n sla_xml=context.getSlaXml(),\n
activate_kw={\'tag\': tag},\n activate_kw={\'tag\': tag},\n
)\n )\n
destroyed = False\n
try:\n
cleanup_delivery_line = request_software_instance.Item_getInstancePackingListLine(\n
portal.portal_preferences.getPreferredInstanceCleanupResource()\n
)\n
if cleanup_delivery_line.getSimulationState() == \'delivered\':\n
destroyed = True\n
except ValueError:\n
pass\n
\n
if not destroyed:\n
if context.getRootState() == \'started\':\n if context.getRootState() == \'started\':\n
request_software_instance.startRequested()\n request_software_instance.startRequested()\n
request_software_instance.activate(after_tag=tag).requestStartComputerPartition()\n request_software_instance.activate(after_tag=tag).requestStartComputerPartition()\n
......
455 456
\ 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