Maor Lipchuk has posted comments on this change.
Change subject: core: Use storage helper to fetch (related to BZ882825)
......................................................................
Patch Set 3: (3 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHelperBase.java
Line 125: List<StorageServerConnections> connections) {
Line 126: return true;
Line 127: }
Line 128:
Line 129: public static Map<StorageType, List<StorageServerConnections>>
filterLUNsByStorageType(LUNs lun) {
Theocraticly yes, although it does not supported in GUI and VDSM now.
See
http://gerrit.ovirt.org/#/c/9724/7/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AbstractDiskVmCommand.java.
Line 130: Map<StorageType, List<StorageServerConnections>>
storageConnectionsForStorageTypeMap =
Line 131: new EnumMap<StorageType,
List<StorageServerConnections>>(StorageType.class);
Line 132: for (StorageServerConnections lunConnections :
lun.getLunConnections()) {
Line 133: StorageType storageType =
lunConnections.getstorage_type();
Line 133: StorageType storageType =
lunConnections.getstorage_type();
Line 134: if
(!storageConnectionsForStorageTypeMap.containsKey(storageType)) {
Line 135: storageConnectionsForStorageTypeMap.put(storageType,
new LinkedList<StorageServerConnections>());
Line 136: }
Line 137:
storageConnectionsForStorageTypeMap.get(storageType).add(lunConnections);
Nice, will do
Line 138: }
Line 139: return storageConnectionsForStorageTypeMap;
Line 140: }
Line 141:
....................................................
File
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/StorageHelperBaseTest.java
Line 16:
Line 17: @Test
Line 18: public void getLunConnectionsForFC() {
Line 19: LUNs lun = new LUNs();
Line 20: ArrayList<StorageServerConnections> connections = new
ArrayList<StorageServerConnections>();
Done for all
Line 21: lun.setLunConnections(connections);
Line 22: Map<StorageType, List<StorageServerConnections>>
connectionsByType =
Line 23: StorageHelperBase.filterLUNsByStorageType(lun);
Line 24: assertTrue("Map of storage connections should be empty.",
connectionsByType.isEmpty());
--
To view, visit http://gerrit.ovirt.org/10141
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ida526dd9e08bc9881e65a529cb1b00aee0786af1
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches