Juan Hernandez has posted comments on this change. Change subject: restApi : RestApi to export volume profile to pdf ......................................................................
Patch Set 17: (1 comment) http://gerrit.ovirt.org/#/c/28340/17/backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/gluster/GlusterVolumeResource.java File backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/gluster/GlusterVolumeResource.java: Line 106: public GlusterBricksResource getGlusterBrickSubResource(); Line 107: Line 108: @GET Line 109: @Produces("application/pdf") Line 110: @Path("profilestatsaspdf") > This method can ONLY return the result as pdf.It actually queries for the s That is perfectly ok. What I'm saying is that it should use the same @Path than the method that returns that same data as XML or JSON. If the user wants the output in XML he does the following: GET .../profilestatistics HTTP/1.1 Host: whatever Accept: application/xml If the user wants the output in PDF then he does the following: GET ../profilestatistics HTTP/1.1 Host: whatever Accept: application/pdf The JAX-RS framework (RESTEasy) will decide which method to call according to the @Produces annotation. Line 111: public Response getGlusterVolumeProfileAsPdf(); -- To view, visit http://gerrit.ovirt.org/28340 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie3ff28f5cf18bd7a2bcb53a169873fe6ae3541ed Gerrit-PatchSet: 17 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: anmolbabu <anb...@redhat.com> Gerrit-Reviewer: Alexander Wels <aw...@redhat.com> Gerrit-Reviewer: Juan Hernandez <juan.hernan...@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: automat...@ovirt.org 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