Commit 6801eb5c authored by Iustin Pop's avatar Iustin Pop
Browse files

Export the nicparams too during instance export

The patch tries to export all params (based on the dict defined in
constants), using None for missing keys.
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarMichael Hanselmann <>
parent 2a518543
......@@ -2093,8 +2093,9 @@ def FinalizeExport(instance, snap_disks):
config.set(constants.INISECT_INS, 'nic%d_mac' %
nic_count, '%s' % nic.mac)
config.set(constants.INISECT_INS, 'nic%d_ip' % nic_count, '%s' % nic.ip)
config.set(constants.INISECT_INS, 'nic%d_bridge' % nic_count,
'%s' % nic.bridge)
for param in constants.NICS_PARAMETER_TYPES:
config.set(constants.INISECT_INS, 'nic%d_%s' % (nic_count, param),
'%s' % nic.nicparams.get(param, None))
# TODO: redundant: on load can read nics until it doesn't exist
config.set(constants.INISECT_INS, 'nic_count' , '%d' % nic_total)
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