Commit fabb6c8e authored by Romain Courteaud's avatar Romain Courteaud

Destroy should be done from person.

It allows to propagate the state to the instance.
parent 633c2d13
...@@ -60,16 +60,19 @@ now = DateTime()\n ...@@ -60,16 +60,19 @@ now = DateTime()\n
\n \n
if hosting_subscription.getDestinationSectionValue().getReference() == \'seleniumtester\' and \\\n if hosting_subscription.getDestinationSectionValue().getReference() == \'seleniumtester\' and \\\n
hosting_subscription.getModificationDate() < (now - 1):\n hosting_subscription.getModificationDate() < (now - 1):\n
if hosting_subscription.getSlapState() != "destroy_requested":\n \n
hosting_subscription.requestDestroy(\n person = hosting_subscription.getDestinationSectionValue(portal_type="Person")\n
software_release=hosting_subscription.getRootSoftwareReleaseUrl(),\n person.requestSoftwareInstance(\n
instance_xml=hosting_subscription.getTextContent(),\n software_release=hosting_subscription.getRootSoftwareReleaseUrl(),\n
software_type=hosting_subscription.getSourceReference(),\n instance_xml=hosting_subscription.getTextContent(),\n
sla_xml=hosting_subscription.getSlaXml(),\n software_type=hosting_subscription.getSourceReference(),\n
shared=hosting_subscription.getRootSlave(),\n sla_xml=hosting_subscription.getSlaXml(),\n
comment=\'Requested by clenaup alarm\', \n shared=hosting_subscription.getRootSlave(),\n
activate_kw={\'tag\': tag}\n state="destroyed",\n
)\n software_title=hosting_subscription.getTitle(),\n
comment=\'Requested by clenaup alarm\', \n
activate_kw={\'tag\': tag}\n
)\n
]]></string> </value> ]]></string> </value>
......
770 771
\ 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