<html><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }div.FoxDiv20180412201836504660 { }body { font-size: 10.5pt; font-family: ????; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div>Here is my patches.<span></span></div>
<blockquote style="margin-Top: 0px; margin-Bottom: 0px; margin-Left: 0.5em"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:gsswzt@pku.edu.cn">gsswzt@pku.edu.cn</a></div><div><b>Date:</b> 2018-04-12 16:45</div><div><b>To:</b> <a href="mailto:omachace@redhat.com">omachace</a>; <a href="mailto:users@ovirt.org">users</a></div><div><b>Subject:</b> Re: Re: [ovirt-users] Some questions about Ovirt REST API</div></div></div><div><div class="FoxDiv20180412201836504660">
<div><span></span>Sure.</div><div>I override <i>get()</i> and <i>add()</i> in my <i>BackendVmMytestsResource.java</i></div><div>GET works and POST not.</div>
<blockquote style="margin-Top: 0px; margin-Bottom: 0px; margin-Left: 0.5em"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:omachace@redhat.com">Ondra Machacek</a></div><div><b>Date:</b> 2018-04-12 16:25</div><div><b>To:</b> <a href="mailto:gsswzt@pku.edu.cn">gsswzt@pku.edu.cn</a>; <a href="mailto:users@ovirt.org">users</a></div><div><b>Subject:</b> Re: [ovirt-users] Some questions about Ovirt REST API</div></div></div><div><div>Ah sorry, POST isn't working and GET works, I misread it.</div>
<div> </div>
<div>Can you please share the generated file:</div>
<div> </div>
<div>{project_path}/backend/manager/modules/restapi/interface/definition/target/generated-sources/model/org/ovirt/engine/api/resource/VmMytestResource.java</div>
<div> </div>
<div>Maybe you can even send patches to review as draft for start, we could</div>
<div>better understand the patch then.</div>
<div> </div>
<div>On 04/12/2018 10:14 AM, gsswzt@pku.edu.cn wrote:</div>
<div>> Do you mean /@override/ /getMytestsResource() / in BackendVmResource ?</div>
<div>> I have done that, otherwise GET would not pass.</div>
<div>> </div>
<div>> *From:* Ondra Machacek <mailto:omachace@redhat.com></div>
<div>> *Date:* 2018-04-12 15:43</div>
<div>> *To:* gsswzt@pku.edu.cn <mailto:gsswzt@pku.edu.cn>; users</div>
<div>> <mailto:users@ovirt.org></div>
<div>> *Subject:* Re: [ovirt-users] Some questions about Ovirt REST API</div>
<div>> On 04/11/2018 08:19 AM, gsswzt@pku.edu.cn wrote:</div>
<div>> > Hi,</div>
<div>> ></div>
<div>> > I wants to creating my own service under</div>
<div>> ../vms/{vmid}/myservice.Here is</div>
<div>> > my methods:</div>
<div>> ></div>
<div>> > 1. create VmMytestService in</div>
<div>> > /https://github.com/oVirt/ovirt-engine-api-model project./</div>
<div>> > add/@Service VmMytestService mytests() in /VmService .java</div>
<div>> > 2. mvn install it and change the root pom.xml</div>
<div>> > /<model.version>4.3.9-SNAPSHOT</model.version> / in my Ovirt project.</div>
<div>> > 3.create BackendVmMytestService implements VmMytestResource</div>
<div>> Did you also in BackendVmResource implemented 'mytests' method?</div>
<div>> > 4.override /get() and add() /methods.</div>
<div>> ></div>
<div>> > After that, I use /curl/ tool to send GET and POST request. GET is</div>
<div>> > working and return.</div>
<div>> > However, I get this return after POST request.</div>
<div>> ></div>
<div>> > Would you help me with that issue?</div>
<div>> ></div>
<div>> > Thanks,</div>
<div>> > wenzt</div>
<div>> ></div>
<div>> ></div>
<div>> > _______________________________________________</div>
<div>> > Users mailing list</div>
<div>> > Users@ovirt.org</div>
<div>> > http://lists.ovirt.org/mailman/listinfo/users</div>
<div>> ></div>
<div>> </div>
</div></blockquote>
</div></div></blockquote>
</body></html>