Ramesh N has posted comments on this change. Change subject: gluster: dao changes for volume capacity info ......................................................................
Patch Set 8: (5 comments) Patch set to follow http://gerrit.ovirt.org/#/c/23010/8/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/gluster/GlusterBrickDao.java File backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/gluster/GlusterBrickDao.java: Line 56: public void updateAllBrickTasksByHostIdBrickDirInBatch(Collection<GlusterBrickEntity> bricks); Line 57: Line 58: public void updateBrickProperties(BrickProperties brickProperties); Line 59: Line 60: public void updateBrickProperties(List<GlusterBrickEntity> bricks); > Test cases for these methods are missing Done http://gerrit.ovirt.org/#/c/23010/8/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/gluster/GlusterBrickDaoDbFacadeImpl.java File backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/gluster/GlusterBrickDaoDbFacadeImpl.java: Line 282: getCustomMapSqlParameterSource() Line 283: .addValue("brick_id", brickProperties.getBrickId()) Line 284: .addValue("total_space", brickProperties.getTotalSize()) Line 285: .addValue("used_space", brickProperties.getTotalSize() - brickProperties.getFreeSize()) Line 286: .addValue("free_space", brickProperties.getFreeSize())); > getBrickPropertiesMapper() can be used here I think we cann't use BrickPropertiesMapper. We have to pass BrickEntity to use that mapper. Line 287: } Line 288: Line 289: private MapSqlParameterSource createBrickIdParams(Guid brickId) { Line 290: return getCustomMapSqlParameterSource().addValue("brick_id", brickId); http://gerrit.ovirt.org/#/c/23010/8/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/gluster/GlusterVolumeDaoTest.java File backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/gluster/GlusterVolumeDaoTest.java: Line 91: assertTrue(volume.getAdvancedDetails().getCapacityInfo().getUsedSize() == 60000); Line 92: assertTrue(volume.getAdvancedDetails().getCapacityInfo().getFreeSize() == 40000); Line 93: assertNotNull(volume.getAdvancedDetails().getUpdatedAt()); Line 94: } Line 95: > testcase for updating capacity information is missing Done Line 96: @Test Line 97: public void testGetAllWithQuery() { Line 98: List<GlusterVolumeEntity> volumes = Line 99: dao.getAllWithQuery("select * from gluster_volumes_view where vol_type = '" http://gerrit.ovirt.org/#/c/23010/8/backend/manager/modules/dal/src/test/resources/fixtures.xml File backend/manager/modules/dal/src/test/resources/fixtures.xml: Line 5269: <value>80000</value> Line 5270: <value>20000</value> Line 5271: <value>2010-11-29 15:57:10</value> Line 5272: </row> Line 5273: </table> > gluster_volume_brick_details missing Done Line 5274: Line 5275: <table name="gluster_volume_bricks"> Line 5276: <column>id</column> Line 5277: <column>volume_id</column> http://gerrit.ovirt.org/#/c/23010/8/packaging/dbscripts/create_views.sql File packaging/dbscripts/create_views.sql: Line 1648: CREATE OR REPLACE VIEW gluster_volume_brick_details_view Line 1649: AS Line 1650: SELECT gluster_volume_brick_details.* Line 1651: FROM gluster_volume_brick_details Line 1652: INNER JOIN gluster_volume_bricks ON gluster_volume_brick_details.brick_id = gluster_volume_bricks.id; > Is this view required as no extra column in the SELECT list? Done Line 1653: Line 1654: CREATE OR REPLACE VIEW gluster_server_hooks_view Line 1655: AS Line 1656: SELECT gluster_server_hooks.*, -- To view, visit http://gerrit.ovirt.org/23010 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7d67b7ee22f4cb6839d0f14d3f27f3e22149ff22 Gerrit-PatchSet: 8 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Ramesh N <rnach...@redhat.com> Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com> Gerrit-Reviewer: Ramesh N <rnach...@redhat.com> Gerrit-Reviewer: Sahina Bose <sab...@redhat.com> Gerrit-Reviewer: Shubhendu Tripathi <shtri...@redhat.com> Gerrit-Reviewer: anmolbabu <anb...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches