Libor Spevak has uploaded a new change for review.

Change subject: webadmin: Export/import monitors count
......................................................................

webadmin: Export/import monitors count

Templates exported and imported back from the export storage domain
(using clone) end up with 0 monitors (VM cannot be created
from the template since we do not support headless vms).

The template to be exported didn't updated managed devices from db
during the export and the XML didn't contain information about monitors.

Change-Id: Ie833ee6de83fad82932e252e8ed83df71b5c495c
Bug-Url: https://bugzilla.redhat.com/917375
Signed-off-by: Libor Spevak <lspe...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportVmTemplateCommand.java
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/05/12705/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportVmTemplateCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportVmTemplateCommand.java
index 781d168..1c6e91c 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportVmTemplateCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportVmTemplateCommand.java
@@ -6,6 +6,7 @@
 import java.util.Map;
 
 import org.ovirt.engine.core.bll.job.ExecutionHandler;
+import org.ovirt.engine.core.bll.utils.VmDeviceUtils;
 import org.ovirt.engine.core.bll.validator.StorageDomainValidator;
 import org.ovirt.engine.core.common.AuditLogType;
 import org.ovirt.engine.core.common.VdcObjectType;
@@ -136,6 +137,8 @@
                 new HashMap<Guid, KeyValuePairCompat<String, List<Guid>>>();
         OvfDataUpdater.getInstance().loadTemplateData(getVmTemplate());
         VmTemplateHandler.UpdateDisksFromDb(getVmTemplate());
+        // load managed devices
+        VmDeviceUtils.setVmDevices(getVmTemplate());
         // update the target (export) domain
         
OvfDataUpdater.getInstance().buildMetadataDictionaryForTemplate(getVmTemplate(),
 metaDictionary);
         
OvfDataUpdater.getInstance().executeUpdateVmInSpmCommand(getVmTemplate().getstorage_pool_id().getValue(),


--
To view, visit http://gerrit.ovirt.org/12705
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie833ee6de83fad82932e252e8ed83df71b5c495c
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Libor Spevak <lspe...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to