The API of the engine is specified by [1].
Specifically, what you're looking for is StorageDomainTemplateService [2].
However, I am not sure that it's worth adding features to the export domain
as I think that it's going to be (or already) deprecated.
Daniel/Tal?
Regards,
Idan
[1]
On Mon, Jul 30, 2018 at 11:55 AM, like.ma(a)cs2c.com.cn <like.ma(a)cs2c.com.cn>
wrote:
Hi, Idan.
I have one more question. There is no diskattachments link for template in
export storage domain.
So i want to add the diskattachments link for it. I tried to read the
source code in ovirt-engine project.
BackendStorageDomainTemplateResource defines some methods of
StorageDomainTemplate.
It implements the interface org.ovirt.engine.api.resource.
StorageDomainTemplateResource.
But i can't find where is the location of org.ovirt.engine.api.resource.
StorageDomainTemplateResource.
Could you please tell me where i can find the source code of
StorageDomainTemplateResource?
Thanks
Regards.
------------------------------
like.ma(a)cs2c.com.cn
*From:* like.ma(a)cs2c.com.cn
*Date:* 2018-07-26 17:20
*To:* Idan Shaby <ishaby(a)redhat.com>
*CC:* users <users(a)ovirt.org>
*Subject:* Re: Re: [ovirt-users] template disk attribute in version 4
restapi
Thanks a lot. You're right, something is indeed wrong. From your reply, i
suddenly realized that maybe some configuration is not right. And finally i
find that my colleague added ENGINE_API_DEFAULT_VERSION=3 in the
configuration file for his own experiment, but he didn't notify us. Now i
delete the configuration item, everything is fine.
------------------------------
like.ma(a)cs2c.com.cn
*From:* Idan Shaby <ishaby(a)redhat.com>
*Date:* 2018-07-26 16:41
*To:* like.ma(a)cs2c.com.cn
*CC:* users <users(a)ovirt.org>
*Subject:* Re: Re: [ovirt-users] template disk attribute in version 4
restapi
Sounds like something's wrong.
I've just checked 4.1.9 and I do have the diskattachments link under a
specific template.
Can you say what you do have under /ovirt-engine/api/templates/<t
emplate_id>?
This is the output I get in 4.1.9 under ovirt-engine/api/templates/
00000000-0000-0000-0000-000000000000/ (pasting only the links):
<link href="/ovirt-engine/api/templates/00000000-0000-0000-
0000-000000000000/graphicsconsoles" rel="graphicsconsoles"/>
<link
href="/ovirt-engine/api/templates/00000000-0000-0000-0000-000000000000/cdroms"
rel="cdroms"/>
<link
href="/ovirt-engine/api/templates/00000000-0000-0000-0000-000000000000/watchdogs"
rel="watchdogs"/>
<link href="/ovirt-engine/api/templates/00000000-0000-0000-
0000-000000000000/diskattachments" rel="diskattachments"/>
<link
href="/ovirt-engine/api/templates/00000000-0000-0000-0000-000000000000/nics"
rel="nics"/>
<link
href="/ovirt-engine/api/templates/00000000-0000-0000-0000-000000000000/permissions"
rel="permissions"/>
<link
href="/ovirt-engine/api/templates/00000000-0000-0000-0000-000000000000/tags"
rel="tags"/>
Regards,
Idan
On Thu, Jul 26, 2018 at 9:14 AM, like.ma(a)cs2c.com.cn <like.ma(a)cs2c.com.cn>
wrote:
> In my oVirt 4.1.9 env, vm's api is fine. I can get vm's diskattachments
> from /ovirt-engine/api/vms/<vm_id>/diskattachments.
> But for template, i got an error(404 not found) from
> /ovirt-engine/api/templates/<template_id>/diskattachments.
>
> ------------------------------
> like.ma(a)cs2c.com.cn
>
>
> *From:* Idan Shaby <ishaby(a)redhat.com>
> *Date:* 2018-07-26 13:44
> *To:* like.ma(a)cs2c.com.cn
> *CC:* users <users(a)ovirt.org>
> *Subject:* Re: Re: [ovirt-users] template disk attribute in version 4
> restapi
> Actually, it was added back in oVirt 4.0.
> What happens when you try to GET from /ovirt-engine/api/templates/<t
> emplate_id>/diskattachments?
> Do you get an empty list of attachments or an error (404 not found)?
>
>
>
> Regards,
> Idan
>
> On Thu, Jul 26, 2018 at 4:10 AM, like.ma(a)cs2c.com.cn <like.ma(a)cs2c.com.cn
> > wrote:
>
>> Thank you for your reply.
>> I'm using ovirt 4.1.9, in this version there is no diskattachments under
>> /ovirt-engine/api/templates/<template_id>, is it added in oVirt4.2?
>>
>> ------------------------------
>> like.ma(a)cs2c.com.cn
>>
>>
>> *From:* Idan Shaby <ishaby(a)redhat.com>
>> *Date:* 2018-07-25 19:30
>> *To:* like.ma(a)cs2c.com.cn
>> *CC:* users <users(a)ovirt.org>
>> *Subject:* Re: [ovirt-users] template disk attribute in version 4
>> restapi
>> Hi,
>>
>> The bootable attribute was moved, along with a few more attributes, to
>> be under a specific diskattachment, as it is an attribute of the
>> relationship between a disk and the specific VM it is attached to, rather
>> than a disk (which can be floating, or attached to more than one VM).
>> I am not sure that I understand the question. A template does have
>> diskattachments under /ovirt-engine/api/templates/<t
>> emplate_id>/diskattachments.
>> Which engine's version are you using?
>>
>>
>> Regards,
>> Idan
>>
>> On Wed, Jul 25, 2018 at 1:35 PM, like.ma(a)cs2c.com.cn <
>> like.ma(a)cs2c.com.cn> wrote:
>>
>>> Hi All,
>>>
>>> In the restapi of version 3, there is bootable attribute in disk. But
>>> in version 4, the bootable attribute is removed from disk. For vm i can get
>>> bootable attribute from diskattachment. But there is no diskattachment in
>>> template. So, is there any way in the restapi of version 4 that i can know
>>> if the disk of the template is bootable or not?
>>>
>>> Thanks
>>>
>>> Regards.
>>>
>>> ------------------------------
>>> like.ma(a)cs2c.com.cn
>>>
>>> _______________________________________________
>>> Users mailing list -- users(a)ovirt.org
>>> To unsubscribe send an email to users-leave(a)ovirt.org
>>> Privacy Statement:
https://www.ovirt.org/site/privacy-policy/
>>> oVirt Code of Conduct:
https://www.ovirt.org/communit
>>> y/about/community-guidelines/
>>> List Archives:
https://lists.ovirt.org/archiv
>>> es/list/users(a)ovirt.org/message/ZASGTIYNCZ6ESWWCB6LZJFG2KSVQGS6Q/
>>>
>>>
>>
>