Kanagaraj M has posted comments on this change.
Change subject: engine: Get gluster hooks query
......................................................................
Patch Set 16: (7 inline comments)
....................................................
File backend/manager/dbscripts/upgrade/03_02_0470_add_gluster_hooks_table.sql
Line 25: -- Add gluster_server_hooks table
Line 26: CREATE TABLE gluster_server_hooks
Line 27: (
Line 28: hook_id UUID NOT NULL REFERENCES gluster_hooks(id) ON DELETE
CASCADE,
Line 29: host_id UUID NOT NULL,
add references to vds_static
Line 30: content_type VARCHAR(50),
Line 31: checksum VARCHAR(256),
Line 32: status VARCHAR(50),
Line 33: _create_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT
LOCALTIMESTAMP,
Line 28: hook_id UUID NOT NULL REFERENCES gluster_hooks(id) ON DELETE
CASCADE,
Line 29: host_id UUID NOT NULL,
Line 30: content_type VARCHAR(50),
Line 31: checksum VARCHAR(256),
Line 32: status VARCHAR(50),
please keep the order of the fields as same as gluster_hooks. and also the
column names (hook_status).
Line 33: _create_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT
LOCALTIMESTAMP,
Line 34: _update_date TIMESTAMP WITH TIME ZONE
Line 35: ) WITH OIDS;
Line 36: CREATE INDEX IDX_gluster_server_hooks ON
gluster_server_hooks(hook_id, host_id);
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GetGlusterHooksQuery.java
Line 5:
Line 6: /**
Line 7: * Query to fetch gluster hooks for the Gluster cluster
Line 8: */
Line 9: public class GetGlusterHooksQuery<P extends GlusterParameters> extends
GlusterQueriesCommandBase<P> {
Parameters class should have a boolean flag, to denote whether to fetch the
GlusterServerHooks or not.
Line 10:
Line 11: public GetGlusterHooksQuery(P parameters) {
Line 12: super(parameters);
Line 13: }
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterQueriesCommandBase.java
Line 54: return vds.getId();
Line 55: }
Line 56:
Line 57: protected VDSReturnValue runVdsCommand(VDSCommandType commandType,
VDSParametersBase parameters)
Line 58: throws VdcBLLException {
i think this change should go as part of the refactoring patch.
Line 59: VDSReturnValue returnValue =
getBackendResourceManager().RunVdsCommand(commandType, parameters);
Line 60: if (!returnValue.getSucceeded()) {
Line 61: throw new
VdcBLLException(returnValue.getVdsError().getCode(), returnValue.getVdsError()
Line 62: .getMessage());
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterHookEntity.java
Line 201: }
Line 202:
Line 203: public boolean isContentConflict() {
Line 204: return (this.conflictStatus & CONTENT_CONFLICT.getValue()) ==
CONTENT_CONFLICT.getValue();
Line 205: }
I would be nice if you could add another method
public boolean hasConflicts() {
return this.conflictStatus > 0;
}
Line 206:
Line 207: public void setConflictValue(boolean missingHook, boolean
statusConflict, boolean contentConflict) {
Line 208: this.conflictStatus = 0;
Line 209: if (missingHook) {
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterHookStatus.java
Line 18:
Line 19: /**
Line 20: * Unknown/Missing hook status
Line 21: */
Line 22: MISSING;
I think this is no more valid as per the discussion.
Line 23:
....................................................
File
frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/core/Common.gwt.xml
Line 307: <include
name="common/businessentities/gluster/ServiceType.java"/>
Line 308: <include
name="common/businessentities/gluster/GlusterHookEntity.java"/>
Line 309: <include
name="common/businessentities/gluster/GlusterHookStage.java"/>
Line 310: <include
name="common/businessentities/gluster/GlusterHookStatus.java"/>
Line 311: <include
name="common/businessentities/gluster/GlusterHookContentType.java"/>
GlusterServerHook and GlusterHookConflictStatus are missing.
Line 312: <include name="common/action/gluster/*.java"/>
Line 313: <include name="common/queries/gluster/*.java"/>
Line 314: <include
name="common/constants/gluster/GlusterConstants.java"/>
Line 315: <include
name="common/utils/gluster/GlusterCoreUtil.java"/>
--
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: 16
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