Commit 5aec3392 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

slapproxy: always give a reference to the partition address

Some recipes (like softwaretype) need a reference for the partition
address and in webrunner, we don't have tap interface.

/reviewed-on !287
parent aa3fbea7
Pipeline #14392 passed with stage
in 0 seconds
......@@ -363,7 +363,8 @@ def loadComputerConfigurationFromXML():
partition['computer_reference'] = computer_dict['reference']
execute_db('partition', 'INSERT OR IGNORE INTO %s (reference, computer_reference) values(:reference, :computer_reference)', partition)
for address in partition['address_list']:
address['reference'] = partition['tap']['name']
# keep "or partition['reference']" for backward compatibility in webrunner
address['reference'] = partition['tap']['name'] or partition['reference']
address['partition_reference'] = partition['reference']
address['computer_reference'] = partition['computer_reference']
execute_db('partition_network', 'INSERT OR REPLACE INTO %s (reference, partition_reference, computer_reference, address, netmask) values(:reference, :partition_reference, :computer_reference, :addr, :netmask)', address)
......
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