Daniel Erez has posted comments on this change.

Change subject: engine: Only iSCSI storage connections are viable for iSCSI Bond
......................................................................


Patch Set 1:

(3 comments)

http://gerrit.ovirt.org/#/c/23720/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/GetStorageConnectionsByDataCenterIdAndStorageTypeQuery.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/GetStorageConnectionsByDataCenterIdAndStorageTypeQuery.java:

Line 20: 
Line 21:         List<StorageServerConnections> connections = 
getDbFacade().getStorageServerConnectionDao()
Line 22:                 
.getAllConnectableStorageSeverConnection(getParameters().getId());
Line 23: 
Line 24:         for (StorageServerConnections connection : connections) {
Now that datacenter type is removed, we should probably introduce some helper 
methods to the dao for filtering according to storage type. 
For this patch, try filtering with CollectionUtils by predicate.
I.e.:
CollectionUtils.filter(connectionsForPool, new Predicate() {
    public boolean evaluate(Object object) {
        StorageServerConnections connection = (StorageServerConnections) object;
        return connection.getstorage_type() == getParameters().getStorageType();
    }
});
Line 25:             if (connection.getstorage_type() == 
getParameters().getStorageType()) {
Line 26:                 result.add(connection);
Line 27:             }
Line 28:         }


http://gerrit.ovirt.org/#/c/23720/1/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java:

Line 2509:         IdQueryParameters params = new 
IdQueryParameters(storagePoolId);
Line 2510:         
Frontend.getInstance().runQuery(VdcQueryType.GetNetworksByDataCenterId, params, 
aQuery);
Line 2511:     }
Line 2512: 
Line 2513:     public static void getDataCenterStorageConnectionsByType(final 
AsyncQuery aQuery,
s/getDataCenterStorageConnectionsByType/getStorageConnectionsByDataCenterIdAndStorageType
Line 2514:                                                              final 
Guid storagePoolId,
Line 2515:                                                              final 
StorageType storageType) {
Line 2516:         aQuery.converterCallback = new IAsyncConverter() {
Line 2517:             @Override


Line 2510:         
Frontend.getInstance().runQuery(VdcQueryType.GetNetworksByDataCenterId, params, 
aQuery);
Line 2511:     }
Line 2512: 
Line 2513:     public static void getDataCenterStorageConnectionsByType(final 
AsyncQuery aQuery,
Line 2514:                                                              final 
Guid storagePoolId,
why final?
Line 2515:                                                              final 
StorageType storageType) {
Line 2516:         aQuery.converterCallback = new IAsyncConverter() {
Line 2517:             @Override
Line 2518:             public Object Convert(Object source, AsyncQuery 
_asyncQuery)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iae30db6aa0c5d2989e9e31566d6555d70259799e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to