Commit 0b5d2625 authored by Romain Courteaud's avatar Romain Courteaud

slapos_cloud: drop ComputePartition_getCustomAllocationParameterDict

This is a hack incompatible with virtual master standalone logic.
Better design is needed
parent ad4ff6e0
query_kw = dict()
if software_instance_portal_type == "Slave Instance" and\
software_release_url == "http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg":
software_release_list = context.SoftwareProduct_getSortedSoftwareReleaseList(software_product_reference="frontend")
if len(software_release_list):
software_release_document = software_release_list[0]
query_kw['software_release_url'] = software_release_document.getUrlString()
# This should be adjusted
query_kw['software_type'] = "custom-personal"
return query_kw
return query_kw
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</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>_params</string> </key>
<value> <string>software_release_url, software_type, software_instance_portal_type, filter_kw, computer_network_query=None, test_mode=False</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ComputePartition_getCustomAllocationParameterDict</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -93,13 +93,6 @@ if 'capability' in filter_kw:
capability = filter_kw.pop('capability')
query_kw['subject'] = {'query': capability, 'key': 'ExactMatch'}
extra_query_kw = context.ComputePartition_getCustomAllocationParameterDict(
software_release_url, software_type, software_instance_portal_type,
filter_kw_copy, computer_network_query, test_mode)
if extra_query_kw:
query_kw.update(extra_query_kw)
if filter_kw.keys():
# XXX Drop all unexpected keys
query_kw["uid"] = "-1"
......
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