Commit fd78b46d authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: do not destroy all slave on a partition

It should be an action on an instance node
parent 2cc21a42
......@@ -13,13 +13,4 @@ if context.getSlapState() not in ["stop_requested", "start_requested"]:
# from a python script
context.SoftwareInstance_renameAndRequestDestroy()
# Request Destroy on all Slaves allocated on the same partition
compute_partition = context.getAggregateValue(
portal_type="Compute Partition")
if compute_partition is not None:
for slave in compute_partition.getAggregateRelatedValueList(
portal_type="Slave Instance"):
slave.SoftwareInstance_renameAndRequestDestroy()
return context.Base_redirect(keep_items={"portal_status_message": "Destroy requested."})
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