Adapt slapproxy to new slaplib behavior

Fix 428e9dad.
parent c034561a
...@@ -362,19 +362,23 @@ def request_not_shared(): ...@@ -362,19 +362,23 @@ def request_not_shared():
for address in execute_db('partition_network', 'SELECT * FROM %s WHERE partition_reference=?', [partition['reference']]): for address in execute_db('partition_network', 'SELECT * FROM %s WHERE partition_reference=?', [partition['reference']]):
address_list.append((address['reference'], address['address'])) address_list.append((address['reference'], address['address']))
# XXX it should be ComputerPartition, not a SoftwareInstance # XXX it should be ComputerPartition, not a SoftwareInstance.
software_instance = SoftwareInstance(xml=partition['xml'], # XXX To much magic here. we should just dumps the ComputerPartition object.
connection_xml=partition['connection_xml'], instance = SoftwareInstance(
slap_computer_id=app.config['computer_id'], xml=partition['xml'],
slap_computer_partition_id=partition['reference'], connection_xml=partition['connection_xml'],
slap_software_release_url=partition['software_release'], slap_computer_id=app.config['computer_id'],
slap_server_url='slap_server_url', slap_computer_partition_id=partition['reference'],
slap_software_type=partition['software_type'], slap_software_release_url=partition['software_release'],
slave_instance_list=partition['slave_instance_list'], slap_server_url='slap_server_url',
instance_guid=partition['reference'], slap_software_type=partition['software_type'],
ip_list=address_list) slave_instance_list=partition['slave_instance_list'],
instance_guid=partition['reference'],
return xml_marshaller.xml_marshaller.dumps(software_instance) ip_list=address_list)
instance._parameter_dict = xml2dict(partition['xml'])
instance._connection_dict = xml2dict(partition['connection_xml'])
instance._requested_state = requested_state
return xml_marshaller.xml_marshaller.dumps(instance)
def request_slave(): def request_slave():
......
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