Sahina Bose has posted comments on this change.
Change subject: restapi: Support for gluster hooks added
......................................................................
Patch Set 2: (3 inline comments)
My comments inline
....................................................
File
backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/ClusterResource.java
Line 35:
Line 36: @Path("glustervolumes")
Line 37: public GlusterVolumesResource getGlusterVolumesResource();
Line 38:
Line 39: @Path("glusterhooks")
I think we refer to Vdsm hooks as hooks, so I called this glusterhooks to
differentiate.
Glusterhooks will be present on gluster servers and is a mechanism to extend
gluster functionality through volume life cycle events, for instance, exporting
volume via SMB
Line 40: public GlusterHooksResource getGlusterHooksResource();
....................................................
File
backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/gluster/GlusterHookResource.java
Line 23: @GET
Line 24: @Formatted
Line 25: public GlusterHook get();
Line 26:
Line 27: @Path("{action: (enable|disable|add|update|remove)}/{oid}")
Background - Gluster hooks need to be in sync across servers in a cluster.
There is a job that checks for the status and updates this is in the engine
database.
1. add|update|remove - we are not really adding a new hook resource into the
database. I should probably call these differently
Add -> If a hook is missing in any of the servers in the cluster, add action is
to add hook (from engine) to all servers where hook is missing.
Update -> If hook content is different in some servers, update action is meant
to update hook content to be same as engine content in all servers where
content is different. If a server id is passed as parameter, then the content
from that server is used to update all servers and engine copy.
Remove -> If hook is missing in some of the servers, we can remove this from
all servers and engine. Here I should use the HTTP method, I agree.
2. enable/disable - used to enable and disable hooks in all servers in cluster.
If I use update, I need to make sure only status value is used. Because the
user should not be able to update any other value of the hook directly.
Line 28: public ActionResource getActionSubresource(@PathParam("action")
String action, @PathParam("oid") String oid);
Line 29:
Line 30: @POST
Line 31: @Formatted
....................................................
File
backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd
Line 3148: </xs:annotation>
Line 3149: </xs:element>
Line 3150: </xs:sequence>
Line 3151: </xs:complexType>
Line 3152:
Will remove WS
Line 3153: <xs:element name="hook_status" type="HookStatus"/>
Line 3154: <xs:complexType name="HookStatus">
Line 3155: <xs:sequence>
Line 3156: <xs:element name="hook_status" type="xs:string" minOccurs="0"
maxOccurs="unbounded">
--
To view, visit http://gerrit.ovirt.org/16512
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibf9c0299977448e0b50feeed6e38a015c60b86fd
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sahina Bose <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Shubhendu Tripathi <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches