Martin Betak has uploaded a new change for review.

Change subject: webadmin: Allow reboot without Guest Agent
......................................................................

webadmin: Allow reboot without Guest Agent

Added check to enable reboot command when acpi is enabled even when
guest agent is not present.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1153711
Change-Id: I7e546122d27786465f355c112b218b128b357d1a
Signed-off-by: Martin Betak <mbe...@redhat.com>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java
1 file changed, 4 insertions(+), 2 deletions(-)


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

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java
index dd51802..8b6cb10 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java
@@ -3670,8 +3670,10 @@
         for (VM vm : vms) {
             Version version = vm.getVdsGroupCompatibilityVersion();
             Version anyDcVersion = new Version();
-            // currently on VDSM side reboot is supported only when the guest 
agent is present and responsive so we need to check for that
-            if (!isCommandCompatible(VdcActionType.RebootVm, version, 
anyDcVersion) || StringHelper.isNullOrEmpty(vm.getVmIp())) {
+            boolean compatibleCluster = 
isCommandCompatible(VdcActionType.RebootVm, version, anyDcVersion);
+            boolean guestAgentPresent = 
!StringHelper.isNullOrEmpty(vm.getVmIp());
+            boolean acpiEnabled = Boolean.TRUE.equals(vm.getAcpiEnable());
+            if (!(compatibleCluster && (guestAgentPresent || acpiEnabled))) {
                 return false;
             }
         }


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e546122d27786465f355c112b218b128b357d1a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Martin Betak <mbe...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to