Sahina Bose has posted comments on this change.
Change subject: engine: Fix brick validation during Add Bricks
......................................................................
Patch Set 1: (2 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/AddBricksToGlusterVolumeCommand.java
Line 184: return getGlusterVolume().getStatus();
Line 185: }
Line 186:
Line 187: private boolean validateBricks(List<GlusterBrickEntity>
newBricks) {
Line 188: for (GlusterBrickEntity brick : newBricks) {
How about if there are duplicated in the newBricks list? Is that possible?
Line 189: GlusterBrickEntity existingBrick =
Line 190:
getGlusterBrickDao().getBrickByServerIdAndDirectory(brick.getServerId(),
brick.getBrickDirectory());
Line 191: if (existingBrick != null) {
Line 192:
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_BRICK_ALREADY_EXISTS_IN_VOLUME);
....................................................
File
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/gluster/GlusterBrickDaoTest.java
Line 56:
Line 57: @Test
Line 58: public void testGetBrickByServerIdAndDirectory() {
Line 59: GlusterBrickEntity brick =
dao.getBrickByServerIdAndDirectory(BRICK_SERVER_ID, BRICK_DIRECTORY);
Line 60: assertNotNull(brick);
also assert that returned brick's server id and directory matches the
parameters passed?
Line 61: }
Line 62:
Line 63: @Test
Line 64: public void testRemove() {
--
To view, visit http://gerrit.ovirt.org/12612
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I83ec15a183d81a274388c313006208d439809548
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Shireesh Anjal <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches