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

React on Software Installation changes instead of PPLs.

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