Commit fffb048b authored by Romain Courteaud's avatar Romain Courteaud

Unused script.

Bye bye typo.
parent 4ebabd62
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.ZSQLCatalog.SQLCatalog import Query, NegatedQuery, ComplexQuery\n
sale_packing_list_line = context\n
instance_type_list = [\'Software Instance\', \'Slave Instance\']\n
\n
hosting_service = context.restrictedTraverse(\n
context.portal_preferences.getPreferredInstanceHostingResource())\n
setup_service = context.restrictedTraverse(\n
context.portal_preferences.getPreferredInstanceSetupResource())\n
update_service = context.restrictedTraverse(\n
context.portal_preferences.getPreferredInstanceUpdateResource())\n
\n
service_uid_list = [hosting_service.getUid(), setup_service.getUid(), update_service.getUid()]\n
\n
state_list = ("confirmed", "started")\n
\n
software_instance = sale_packing_list_line.getAggregateValue(portal_type=instance_type_list)\n
computer_partition = sale_packing_list_line.getAggregateValue(portal_type=\'Computer Partition\')\n
software_release = sale_packing_list_line.getAggregateValue(portal_type="Software Release")\n
\n
ip_list = []\n
if computer_partition.getPortalType() == \'Computer Partition\':\n
for internet_protocol_address in computer_partition.contentValues(portal_type=\'Internet Protocol Address\'):\n
ip_list.append((internet_protocol_address.getNetworkInterface(\'\'), internet_protocol_address.getIpAddress()))\n
if software_instance is not None and computer_partition is not None and software_release is not None:\n
slave_instance_list = []\n
\n
sale_packing_list_line_list = computer_partition.portal_catalog(\n
aggregate_uid=computer_partition.getUid(),\n
aggregate_portal_type=\'Slave Instance\',\n
portal_type="Sale Packing List Line",\n
simulation_state=state_list,\n
default_resource_uid=service_uid_list)\n
\n
for sale_packing_list_line in sale_packing_list_line_list:\n
instance = sale_packing_list_line.getAggregateValue(portal_type=\'Slave Instance\')\n
slave_instance = dict(slave_title=instance.getTitle(),\n
slap_software_type=instance.getSourceReference(),\n
slave_reference=instance.getReference(),\n
xml=instance.getTextContent(),\n
connection_xml=instance.getConnectionXml(),\n
)\n
slave_instance_list.append(slave_instance)\n
return {\n
\'xml\':software_instance.getTextContent(),\n
\'connection_xml\':software_instance.getConnectionXml(),\n
\'slap_computer_id\':computer_partition.getParentValue().getReference(),\n
\'slap_computer_partition_id\':computer_partition.getReference(),\n
\'slap_software_type\': software_instance.getSourceReference(),\n
\'slap_software_release_url\':software_release.getUrlString(),\n
\'slave_instance_list\': slave_instance_list,\n
\'ip_list\':ip_list,\n
}\n
\n
return None\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SalePackinListLine_asSoftwareInstnaceComputerPartitionMergedDict</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
734
\ No newline at end of file
735
\ 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