Commit 0c4a37ae authored by Łukasz Nowak's avatar Łukasz Nowak

React on Software Installation changes instead of PPLs.

parent 36d5e5c7
......@@ -51,6 +51,10 @@
<type>Slave Instance</type>
<workflow>slap_interaction_workflow</workflow>
</chain>
<chain>
<type>Software Installation</type>
<workflow>slap_interaction_workflow</workflow>
</chain>
<chain>
<type>Software Instance</type>
<workflow>slap_interaction_workflow</workflow>
......
......@@ -28,7 +28,7 @@
<key> <string>after_script_name</string> </key>
<value>
<list>
<string>PurchasePackingList_reindexAggregatedComputer</string>
<string>SoftwareInstallation_reindexAggregatedComputer</string>
</list>
</value>
</item>
......@@ -50,14 +50,14 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PurchasePackingList_stop_deliver</string> </value>
<value> <string>SoftwareInstallation_start_destroy</string> </value>
</item>
<item>
<key> <string>method_id</string> </key>
<value>
<list>
<string>stop</string>
<string>deliver</string>
<string>requestStart</string>
<string>requestDestroy</string>
</list>
</value>
</item>
......@@ -69,7 +69,7 @@
<key> <string>portal_type_filter</string> </key>
<value>
<list>
<string>Purchase Packing List</string>
<string>Software Installation</string>
</list>
</value>
</item>
......
......@@ -50,21 +50,16 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>sale_packing_list = state_change[\'object\']\n
<value> <string>software_installation = state_change[\'object\']\n
\n
setup_service_relative_url = sale_packing_list.portal_preferences.getPreferredSoftwareSetupResource()\n
\n
for purchase_packing_list_line in sale_packing_list.contentValues(\n
portal_type="Purchase Packing List Line"):\n
if purchase_packing_list_line.getResource() == setup_service_relative_url:\n
computer = purchase_packing_list_line.getAggregateValue(portal_type="Computer")\n
if computer is None:\n
raise ValueError("Purchase Packing List Line \'%s\' should have a computer aggregated" % purchase_packing_list_line.getRelativeUrl())\n
else:\n
tag = "%s_reindex" % purchase_packing_list_line.getRelativeUrl()\n
# As software is installed, reindex the computer to mark the computer partition as installable\n
purchase_packing_list_line.reindexObject(activate_kw={\'tag\': tag})\n
computer.activate(after_tag=tag).recursiveReindexObject()\n
computer = software_installation.getAggregateValue(portal_type="Computer")\n
if computer is None:\n
raise ValueError("Software Installation \'%s\' should have a computer aggregated" % software_installation.getRelativeUrl())\n
else:\n
tag = "%s_reindex" % software_installation.getRelativeUrl()\n
# As software is installed, reindex the computer to mark the computer partition as installable\n
software_installation.reindexObject(activate_kw={\'tag\': tag})\n
computer.activate(after_tag=tag).recursiveReindexObject()\n
</string> </value>
</item>
<item>
......@@ -73,7 +68,7 @@ for purchase_packing_list_line in sale_packing_list.contentValues(\n
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PurchasePackingList_reindexAggregatedComputer</string> </value>
<value> <string>SoftwareInstallation_reindexAggregatedComputer</string> </value>
</item>
</dictionary>
</pickle>
......
809
\ No newline at end of file
810
\ No newline at end of file
......@@ -14,6 +14,7 @@ Sale Invoice Transaction | slap_interaction_workflow
Sale Packing List Line | slap_interaction_workflow
Sale Packing List | slap_interaction_workflow
Slave Instance | slap_interaction_workflow
Software Installation | slap_interaction_workflow
Software Instance | slap_interaction_workflow
Software Release | slap_interaction_workflow
Virtio Partition | computer_partition_slap_interface_workflow
......
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