Sahina Bose has uploaded a new change for review.

Change subject: gluster: Overriding getVdsGroup in GlusterHookCommandBase
......................................................................

gluster: Overriding getVdsGroup in GlusterHookCommandBase

Overriding getVdsGroup in GlusterHookCommandBase to
make sure that vds group is set from hook's cluster id
and is not null for action messages and canDoAction

Change-Id: I669b0039bc3bc5f8edfe5f1292683c5c7e48b4e9
Signed-off-by: Sahina Bose <sab...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterHookCommandBase.java
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/43/15243/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterHookCommandBase.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterHookCommandBase.java
index 50df8d1..1e26980 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterHookCommandBase.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterHookCommandBase.java
@@ -5,6 +5,7 @@
 import org.ovirt.engine.core.bll.interfaces.BackendInternal;
 import org.ovirt.engine.core.common.action.gluster.GlusterHookParameters;
 import org.ovirt.engine.core.common.businessentities.VDS;
+import org.ovirt.engine.core.common.businessentities.VDSGroup;
 import org.ovirt.engine.core.common.businessentities.gluster.GlusterHookEntity;
 import org.ovirt.engine.core.common.businessentities.gluster.GlusterHookStatus;
 import org.ovirt.engine.core.common.businessentities.gluster.GlusterServerHook;
@@ -26,6 +27,14 @@
         return super.getBackend();
     }
 
+    @Override
+    protected VDSGroup getVdsGroup() {
+        if (getGlusterHook() != null) {
+            setVdsGroupId(getGlusterHook().getClusterId());
+        }
+        return super.getVdsGroup();
+    }
+
     protected GlusterHookEntity getGlusterHook() {
         if (entity == null) {
             entity = 
getGlusterHooksDao().getById(getParameters().getHookId(),true);


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

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

Reply via email to