Commit 8a1e319b 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 9a6763b9
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>
......@@ -89,13 +89,6 @@ for base_category in compute_node_base_category_list:
else:
query_kw["%s__uid" % base_category] = category.getUid()
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