Commit 51de46bf authored by Iustin Pop's avatar Iustin Pop
Browse files

Change the backend to use the beparams

The backend.FinalizeExport function is changed to use the beparams
instead of the instance attributes. Future enhancements should be done
in order to export and import/reuse the whole be/hv params.

Reviewed-by: ultrotter
parent 8b3fd458
......@@ -1419,8 +1419,10 @@ def FinalizeExport(instance, snap_disks):
config.add_section(constants.INISECT_INS)
config.set(constants.INISECT_INS, 'name', instance.name)
config.set(constants.INISECT_INS, 'memory', '%d' % instance.memory)
config.set(constants.INISECT_INS, 'vcpus', '%d' % instance.vcpus)
config.set(constants.INISECT_INS, 'memory', '%d' %
instance.beparams[constants.BE_MEMORY])
config.set(constants.INISECT_INS, 'vcpus', '%d' %
instance.beparams[constants.BE_VCPUS])
config.set(constants.INISECT_INS, 'disk_template', instance.disk_template)
nic_count = 0
......
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