Arik Hadas has uploaded a new change for review.

Change subject: core: use previously used address of balloon device
......................................................................

core: use previously used address of balloon device

We should pass the previously used address of balloon device when
running VM so it won't be detected as a new device and trigger
the 'install driver for new device' dialog in the guest

Change-Id: Ie4b93a14f395c3e7bdb83dc0a25dbda0546e4e92
Bug-Url: https://bugzilla.redhat.com/1028387
Signed-off-by: Arik Hadas <[email protected]>
---
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/82/31882/1

diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java
index 8908966..90ff513 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java
@@ -429,7 +429,7 @@
                 DbFacade.getInstance()
                         .getVmDeviceDao()
                         .getUnmanagedDevicesByVmId(vm.getId());
-        if (vmDevices.size() > 0) {
+        if (!vmDevices.isEmpty()) {
             StringBuilder id = new StringBuilder();
             for (VmDevice vmDevice : vmDevices) {
                 Map struct = new HashMap();
@@ -539,7 +539,7 @@
 
     private static void addAddress(VmDevice vmDevice, Map<String, Object> 
struct) {
         Map<String, String> addressMap = 
XmlRpcStringUtils.string2Map(vmDevice.getAddress());
-        if (addressMap.size() > 0) {
+        if (!addressMap.isEmpty()) {
             struct.put(VdsProperties.Address, addressMap);
         }
     }
@@ -880,6 +880,7 @@
             vmDevice.setSpecParams(specParams);
         }
         specParams.put(VdsProperties.Model, VdsProperties.Virtio);
+        addAddress(vmDevice, struct);
         addDevice(struct, vmDevice, null);
     }
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie4b93a14f395c3e7bdb83dc0a25dbda0546e4e92
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Arik Hadas <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to