From 51de46bf67ab104b5a3a22dcecd9ffe26a2640a5 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Tue, 14 Oct 2008 11:29:44 +0000 Subject: [PATCH] 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 --- lib/backend.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/backend.py b/lib/backend.py index 9a6b5e5cc..d2e7cd193 100644 --- a/lib/backend.py +++ b/lib/backend.py @@ -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 -- GitLab