Kanagaraj M has posted comments on this change.
Change subject: engine: Manage Gluster hooks support
......................................................................
Patch Set 19: (4 inline comments)
....................................................
File
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/GetGlusterHooksQueryTest.java
Line 21: public class GetGlusterHooksQueryTest extends
Line 22: AbstractQueryTest<GlusterParameters,
GetGlusterHooksQuery<GlusterParameters>> {
Line 23:
Line 24: public static Guid CLUSTER_ID = new
Guid("b399944a-81ab-4ec5-8266-e19ba7c3c9d1");
Line 25: public static Guid UPSERVER_ID = new
Guid("85c42b0d-c2b7-424a-ae72-5174c25da40b");
this is unused.
Line 26:
Line 27: List<GlusterHookEntity> expected;
Line 28: List<GlusterHookEntity> emptyList;
Line 29: GlusterHooksDao glusterHookDaoMock;
....................................................
File
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/gluster/GlusterHooksDaoDbFacadeImpl.java
Line 125: .addValue("conflict_status",
hook.getConflictStatus()));
Line 126: }
Line 127:
Line 128: @Override
Line 129: public void updateGlusterHookStatus(Guid id, Guid serverId,
GlusterHookStatus status) {
Please rename this to "updateGlusterServerHookStatus"
Line 130:
getCallsHandler().executeModification("UpdateGlusterServerHookStatus",
Line 131: getCustomMapSqlParameterSource()
Line 132: .addValue("hook_id", id)
Line 133: .addValue("server_id", serverId)
....................................................
File
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/gluster/GlusterHooksDao.java
Line 50: public void updateGlusterHook(GlusterHookEntity hook);
Line 51:
Line 52: public void updateGlusterHookStatus(Guid hookId, Guid serverId,
GlusterHookStatus status);
Line 53:
Line 54: public void updateGlusterHookContent(Guid id, String content);
Checksum also needs to be updated while updating the content.
Line 55:
Line 56: public void updateGlusterHookConflictStatus(Guid hookId, Integer
conflictStatus);
Line 57:
Line 58: public void saveGlusterServerHook(GlusterServerHook serverHook);
....................................................
File
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/gluster/GlusterHooksDaoTest.java
Line 105: }
Line 106:
Line 107: @Test
Line 108: public void testUpdateGlusterHookStatus() {
Line 109: dao.updateGlusterHookStatus(FixturesTool.HOOK_ID, null,
GlusterHookStatus.ENABLED);
i think you need to pass the SERVER_ID which you want to update the status.
Line 110: GlusterHookEntity hook = dao.getById(FixturesTool.HOOK_ID);
Line 111: assertNotNull(hook);
Line 112: assertEquals(GlusterHookStatus.ENABLED, hook.getStatus());
Line 113: }
--
To view, visit http://gerrit.ovirt.org/10650
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If8b2d261ead720fccea6884acbc806ec79e52b36
Gerrit-PatchSet: 19
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Selvasundaram <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Itamar Heim <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Selvasundaram <[email protected]>
Gerrit-Reviewer: Shireesh Anjal <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches