[ovirt-users] Some questions about Ovirt REST API

gsswzt at pku.edu.cn gsswzt at pku.edu.cn
Thu Apr 12 12:19:35 UTC 2018


Here is my patches.
 
From: gsswzt at pku.edu.cn
Date: 2018-04-12 16:45
To: omachace; users
Subject: Re: Re: [ovirt-users] Some questions about Ovirt REST API
Sure.
I override get() and add() in my BackendVmMytestsResource.java
GET works and POST not.
 
From: Ondra Machacek
Date: 2018-04-12 16:25
To: gsswzt at pku.edu.cn; users
Subject: Re: [ovirt-users] Some questions about Ovirt REST API
Ah sorry, POST isn't working and GET works, I misread it.
 
Can you please share the generated file:
 
{project_path}/backend/manager/modules/restapi/interface/definition/target/generated-sources/model/org/ovirt/engine/api/resource/VmMytestResource.java
 
Maybe you can even send patches to review as draft for start, we could
better understand the patch then.
 
On 04/12/2018 10:14 AM, gsswzt at pku.edu.cn wrote:
> Do you mean /@override/ /getMytestsResource() / in BackendVmResource ?
> I have done that, otherwise GET would not pass.
> 
>     *From:* Ondra Machacek <mailto:omachace at redhat.com>
>     *Date:* 2018-04-12 15:43
>     *To:* gsswzt at pku.edu.cn <mailto:gsswzt at pku.edu.cn>; users
>     <mailto:users at ovirt.org>
>     *Subject:* Re: [ovirt-users] Some questions about Ovirt REST API
>     On 04/11/2018 08:19 AM, gsswzt at pku.edu.cn wrote:
>      > Hi,
>      >
>      > I wants to creating my own service under
>     ../vms/{vmid}/myservice.Here is
>      > my methods:
>      >
>      > 1. create VmMytestService in
>      > /https://github.com/oVirt/ovirt-engine-api-model project./
>      > add/@Service VmMytestService mytests() in /VmService .java
>      > 2. mvn install it and change the root pom.xml
>      > /<model.version>4.3.9-SNAPSHOT</model.version> / in my Ovirt project.
>      > 3.create BackendVmMytestService implements VmMytestResource
>     Did you also in BackendVmResource implemented 'mytests' method?
>      > 4.override /get() and add() /methods.
>      >
>      > After that, I use /curl/  tool to send GET and POST request. GET is
>      > working and return.
>      > However, I get this return after POST request.
>      >
>      > Would you help me with that issue?
>      >
>      > Thanks,
>      > wenzt
>      >
>      >
>      > _______________________________________________
>      > Users mailing list
>      > Users at ovirt.org
>      > http://lists.ovirt.org/mailman/listinfo/users
>      >
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20180412/f102e02b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mytests-api-model.patch
Type: application/octet-stream
Size: 5165 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/users/attachments/20180412/f102e02b/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mytests-ovirt-project.patch
Type: application/octet-stream
Size: 6946 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/users/attachments/20180412/f102e02b/attachment-0001.obj>


More information about the Users mailing list