Maor Lipchuk has uploaded a new change for review.

Change subject: core: Initialize internal lists in IscsiBond
......................................................................

core: Initialize internal lists in IscsiBond

Initialize the storage domains and the networks when fectching IscsiBond
from query command.

Change-Id: I167b1c6d6c5f83022c18faad555c0ff2e6f1f44b
Bug-Url: https://bugzilla.redhat.com/1133279
Signed-off-by: Maor Lipchuk <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetIscsiBondByIdQuery.java
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/59/31859/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetIscsiBondByIdQuery.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetIscsiBondByIdQuery.java
index 0d91197..b4f58ab 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetIscsiBondByIdQuery.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetIscsiBondByIdQuery.java
@@ -1,5 +1,6 @@
 package org.ovirt.engine.core.bll;
 
+import org.ovirt.engine.core.common.businessentities.IscsiBond;
 import org.ovirt.engine.core.common.queries.IdQueryParameters;
 
 public class GetIscsiBondByIdQuery <P extends IdQueryParameters> extends 
QueriesCommandBase<P> {
@@ -10,6 +11,9 @@
 
     @Override
     protected void executeQueryCommand() {
-        
getQueryReturnValue().setReturnValue(getDbFacade().getIscsiBondDao().get(getParameters().getId()));
+        IscsiBond iscsiBond = 
getDbFacade().getIscsiBondDao().get(getParameters().getId());
+        
iscsiBond.getNetworkIds().addAll(getDbFacade().getIscsiBondDao().getNetworkIdsByIscsiBondId(iscsiBond.getId()));
+        
iscsiBond.getStorageConnectionIds().addAll(getDbFacade().getIscsiBondDao().getStorageConnectionIdsByIscsiBondId(iscsiBond.getId()));
+        getQueryReturnValue().setReturnValue(iscsiBond);
     }
 }


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

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

Reply via email to