Commit 08493ce6 authored by Łukasz Nowak's avatar Łukasz Nowak

- get and set new software instance's coordinates (like SSL key, reference,...

- get and set new software instance's coordinates (like SSL key, reference, etc) during creation of new software instance

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42552 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d47a9a08
<?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>portal = context.getPortalObject()\n
reference = "SOFTINST-%s" % portal.portal_ids.generateNewId(\n
id_group=\'slap_software_instance_reference\',\n
id_generator=\'uid\')\n
certificate_dict = portal.portal_certificate_authority.getNewCertificate(reference)\n
return dict(\n
reference=reference,\n
destination_reference=certificate_dict[\'id\'],\n
ssl_key=certificate_dict[\'key\'],\n
ssl_certificate=certificate_dict[\'certificate\'],\n
)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>reference</string>
<string>certificate_dict</string>
<string>dict</string>
<string>_getitem_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_getNewSoftwareInstanceCoordinate</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -97,6 +97,7 @@ if (request_software_instance is None):\n ...@@ -97,6 +97,7 @@ if (request_software_instance is None):\n
source_reference=requested_partition_reference,\n source_reference=requested_partition_reference,\n
text_content=instance_xml,\n text_content=instance_xml,\n
activate_kw={\'tag\': tag},\n activate_kw={\'tag\': tag},\n
**portal.Base_getNewSoftwareInstanceCoordinate()\n
)\n )\n
sale_packing_list_line = context.SoftwareInstance_getInstanceSetupPackingListLine(state_change)\n sale_packing_list_line = context.SoftwareInstance_getInstanceSetupPackingListLine(state_change)\n
hosting_subscription_uid = sale_packing_list_line.getAggregateValue(portal_type=\'Hosting Subscription\').getUid()\n hosting_subscription_uid = sale_packing_list_line.getAggregateValue(portal_type=\'Hosting Subscription\').getUid()\n
...@@ -193,6 +194,7 @@ software_instance.edit(\n ...@@ -193,6 +194,7 @@ software_instance.edit(\n
<string>request_software_instance</string> <string>request_software_instance</string>
<string>NotImplementedError</string> <string>NotImplementedError</string>
<string>module</string> <string>module</string>
<string>_apply_</string>
<string>context</string> <string>context</string>
<string>sale_packing_list_line</string> <string>sale_packing_list_line</string>
<string>hosting_subscription_uid</string> <string>hosting_subscription_uid</string>
......
183 184
\ 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