Arik Hadas has uploaded a new change for review.

Change subject: core: move floppy path to be set after vds is selected
......................................................................

core: move floppy path to be set after vds is selected

Longer description using lines' length under 72 chars.

With multiple paragraphs if necessary.

Change-Id: I4737a3bc19e4810489eaf13a3ae98c07bfdd033e
Bug-Url: https://bugzilla.redhat.com/??????
Signed-off-by: Arik Hadas <aha...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
1 file changed, 5 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/45/17745/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
index ba31db3..b43dca2 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
@@ -86,7 +86,6 @@
 
     private static final RunVmValidator runVmValidator = new RunVmValidator();
     private String cdImagePath = "";
-    private String floppyImagePath = "";
     private boolean mResume;
     /** Note: this field should not be used directly, use {@link 
#isVmRunningStateless()} instead */
     private Boolean cachedVmIsRunningStateless;
@@ -131,9 +130,6 @@
         RunVmParams runVmParameters = getParameters();
         if (!StringUtils.isEmpty(runVmParameters.getDiskPath())) {
             cdImagePath = cdPathWindowsToLinux(runVmParameters.getDiskPath());
-        }
-        if (!StringUtils.isEmpty(runVmParameters.getFloppyPath())) {
-            floppyImagePath = 
cdPathWindowsToLinux(runVmParameters.getFloppyPath());
         }
 
         if (getVm() != null) {
@@ -453,6 +449,10 @@
 
         getVm().setLastStartTime(new Date());
 
+        if (!StringUtils.isEmpty(getParameters().getFloppyPath())) {
+            
getVm().setFloppyPath(cdPathWindowsToLinux(getParameters().getFloppyPath()));
+        }
+
         // Set path for initrd and kernel image.
         if (!StringUtils.isEmpty(getVm().getInitrdUrl())) {
             getVm().setInitrdUrl(getIsoPrefixFilePath(getVm().getInitrdUrl()));
@@ -596,7 +596,6 @@
             handleMemoryAdjustments();
             VmHandler.updateDisksFromDb(getVm());
             getVm().setCdPath(cdImagePath);
-            getVm().setFloppyPath(floppyImagePath);
             getVm().setKvmEnable(getParameters().getKvmEnable());
             getVm().setRunAndPause(getParameters().getRunAndPause() == null ? 
getVm().isRunAndPause() : getParameters().getRunAndPause());
             getVm().setAcpiEnable(getParameters().getAcpiEnable());
@@ -615,7 +614,7 @@
             
getVm().setInitializationType(getParameters().getInitializationType());
 
             // if we attach floppy we don't need the sysprep
-            if (!StringUtils.isEmpty(getVm().getFloppyPath())) {
+            if (!StringUtils.isEmpty(getParameters().getFloppyPath())) {
                 getVmStaticDAO().update(getVm().getStaticData());
             }
             // get what cpu flags should be passed to vdsm according to cluster


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4737a3bc19e4810489eaf13a3ae98c07bfdd033e
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