Jiří Moskovčák has uploaded a new change for review.

Change subject: userportal | webadmin: don't enable balloon on ppc arch
......................................................................

userportal | webadmin: don't enable balloon on ppc arch

The memory ballooning doesn't work on ppc so neither portal
nor admin should allow it.

Change-Id: If5e6961778675807fb27e5ef4cb72209ee8762ef
Bug-Url: https://bugzilla.redhat.com/1127677
Signed-off-by: Jiri Moskovcak <jmosk...@redhat.com>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java
2 files changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/06/31706/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
index a2046fd..474d485 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java
@@ -27,6 +27,7 @@
 import org.ovirt.engine.core.common.action.VdcReturnValueBase;
 import org.ovirt.engine.core.common.action.VmManagementParametersBase;
 import org.ovirt.engine.core.common.action.VmOperationParameterBase;
+import org.ovirt.engine.core.common.businessentities.ArchitectureType;
 import org.ovirt.engine.core.common.businessentities.Disk;
 import org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType;
 import org.ovirt.engine.core.common.businessentities.DiskImage;
@@ -95,6 +96,7 @@
 
     private final UIConstants constants = 
ConstantsManager.getInstance().getConstants();
     public static final Version BALLOON_DEVICE_MIN_VERSION = Version.v3_2;
+    public static final ArchitectureType BALLOON_DEVICE_BLACKLISTED_ARCH = 
ArchitectureType.ppc64;
     private UICommand newVMCommand;
 
     private final static String SHUTDOWN = "Shutdown"; //$NON-NLS-1$
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java
index f6c1a74..04c48ff 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java
@@ -753,8 +753,11 @@
     protected void updateMemoryBalloon() {
         if (getModel().getSelectedCluster() != null) {
             VDSGroup cluster = getModel().getSelectedCluster();
-            boolean hasMemoryBalloon = cluster.getcompatibility_version()
-                    .compareTo(VmListModel.BALLOON_DEVICE_MIN_VERSION) >= 0;
+            boolean hasMemoryBalloon = (cluster.getcompatibility_version()
+                    .compareTo(VmListModel.BALLOON_DEVICE_MIN_VERSION) >= 0
+                    && cluster.getArchitecture()
+                    .compareTo(VmListModel.BALLOON_DEVICE_BLACKLISTED_ARCH) != 
0);
+
             
getModel().getMemoryBalloonDeviceEnabled().setIsAvailable(hasMemoryBalloon);
         }
     }


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If5e6961778675807fb27e5ef4cb72209ee8762ef
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Jiří Moskovčák <jmosk...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to