Arik Hadas has uploaded a new change for review.

Change subject: core: cleanup in hibernate command
......................................................................

core: cleanup in hibernate command

- remove outdated comment
- cleanup the call to the vds command

Change-Id: I0bba89c108e44819af812928f71a7fac6a184d59
Signed-off-by: Arik Hadas <aha...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HibernateVmCommand.java
1 file changed, 2 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/19/36519/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HibernateVmCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HibernateVmCommand.java
index 4b9a9c8..2d85a88 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HibernateVmCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HibernateVmCommand.java
@@ -124,8 +124,6 @@
             final Guid taskId1 = getAsyncTaskId(SAVE_IMAGE_TASK_KEY);
 
             Guid image1GroupId = Guid.newGuid();
-            // this is temp code until SPM will implement the new verb that 
does
-            // it for us:
 
             Guid hiberVol1 = Guid.newGuid();
             final VDSReturnValue ret1 =
@@ -185,12 +183,9 @@
             Guid guid2 = createTask(taskId2, ret2.getCreationInfo(), 
VdcActionType.HibernateVm);
             getReturnValue().getVdsmTaskIdList().add(guid2);
 
-            // this is the new param that should be passed to the hibernate
-            // command
             
getVm().setHibernationVolHandle(MemoryUtils.createMemoryStateString(
                     getStorageDomainId(), getVm().getStoragePoolId(),
                     image1GroupId, hiberVol1, image2GroupId, hiberVol2));
-            // end of temp code
 
             runVdsCommand(VDSCommandType.UpdateVmDynamicData,
                             new 
UpdateVmDynamicDataVDSCommandParameters(getVm().getDynamicData()));
@@ -319,10 +314,8 @@
                 String hiberVol = getVm().getHibernationVolHandle();
                 if (hiberVol != null) {
                     try {
-                        runVdsCommand(
-                                        VDSCommandType.Hibernate,
-                                        new HibernateVDSCommandParameters(new 
Guid(getVm().getRunOnVds().toString()),
-                                                getVmId(), 
getVm().getHibernationVolHandle()));
+                        runVdsCommand(VDSCommandType.Hibernate,
+                                new 
HibernateVDSCommandParameters(getVm().getRunOnVds(), getVmId(), hiberVol));
                     } catch (VdcBLLException e) {
                         isHibernateVdsProblematic = true;
                         throw e;


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

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

Reply via email to