[prev in list] [next in list] [prev in thread] [next in thread]
List: vdsm-devel
Subject: =?utf-8?q?=5Bovirt-devel=5D?= Re: What values should i give in this ovirt api to get the correct res
From: Germano Veit Michel <germano () redhat ! com>
Date: 2019-07-21 23:26:16
Message-ID: CANHSq5AGm2Vm=dBeb0zo0T-J5r5ErHxMd_f5KuCkQQ-xJoHaBQ () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
There is an example that implements all the logic you need for this:
https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/vm_backup.py
The only thing missing there is the software inside the VM that does the
data copy (it could even be a script), which is out of scope or oVirt.
On Sat, Jul 20, 2019 at 5:10 PM <smidhunraj@gmail.com> wrote:
> I am following this link.
>
>
> https://ovirt.org/documentation/admin-guide/chap-Backups_and_Migration.html#backing-up-and-restoring-virtual-machines-using-the-backup-and-restore-api
>
> I got response for
>
> GET
> /api/vms/4ef8b995-ae58-49d6-8980-ef0fa6688d92/snapshots/1b94ca4e-8c03-4166-8d29-2b831e24b90e/disks
> HTTP/1.1 Accept: application/xml Content-type: application/xml
>
>
> Identify disk id "Array
> (
> [disk] => Array
> (
> [0] => Array
> (
> [actual_size] => 0
> [alias] => GlanceDisk-8700235
> [format] => cow
> [image_id] => a42bda58-7556-4ebe-a54d-03dc0a3b1f54
> [propagate_errors] => false
> [provisioned_size] => 8589934592
> [read_only] => false
> [shareable] => false
> [sparse] => true
> [status] => ok
> [storage_type] => image
> [wipe_after_delete] => false
> [snapshot] => Array
> (
> [id] => 1b94ca4e-8c03-4166-8d29-2b831e24b90e
> )
>
> [storage_domains] => Array
> (
> [storage_domain] => Array
> (
> [0] => Array
> (
> [id] =>
> ad6aea6d-ff90-457f-98eb-99380949e23a
> )
>
> )
>
> )
>
> [name] => GlanceDisk-8700235
> [description] => CentOS 7 Generic Cloud Image v1711
> for x86_64 (8700235)
> [id] => dded245b-4a73-48b4-a1b4-ba98c37490ad
> )
>
>
>
>
> What is the values that i have to give to the POST request in this api
>
>
> POST /api/vms/22222222-2222-2222-2222-222222222222/disks/ HTTP/1.1
> Accept: application/xml
> Content-type: application/xml
>
> <disk id="11111111-1111-1111-1111-111111111111">
> <snapshot id="11111111-1111-1111-1111-111111111111"/>
> <active>true</active>
> </disk>
>
> to replace
> 1)vms ===>> 22222222-2222-2222-2222-222222222222
> 2)disk id 11111111-1111-1111-1111-111111111111
> 3)snapshot id 11111111-1111-1111-1111-111111111111
> _______________________________________________
> Devel mailing list -- devel@ovirt.org
> To unsubscribe send an email to devel-leave@ovirt.org
> Privacy Statement: https://www.ovirt.org/site/privacy-policy/
> oVirt Code of Conduct:
> https://www.ovirt.org/community/about/community-guidelines/
> List Archives:
> https://lists.ovirt.org/archives/list/devel@ovirt.org/message/OPXOP7OLFGSJ626VEX7ZMRWG5IWKGPWZ/
>
[Attachment #5 (text/html)]
<div dir="ltr"><div>There is an example that implements all the logic you need for \
this: <a href="https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/vm_b \
ackup.py">https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/vm_backup.py</a></div><div>The \
only thing missing there is the software inside the VM that does the data copy (it \
could even be a script), which is out of scope or \
oVirt.<br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div \
dir="ltr" class="gmail_attr">On Sat, Jul 20, 2019 at 5:10 PM <<a \
href="mailto:smidhunraj@gmail.com">smidhunraj@gmail.com</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I am following this \
link.<br> <br>
<a href="https://ovirt.org/documentation/admin-guide/chap-Backups_and_Migration.html#backing-up-and-restoring-virtual-machines-using-the-backup-and-restore-api" \
rel="noreferrer" target="_blank">https://ovirt.org/documentation/admin-guide/chap-Back \
ups_and_Migration.html#backing-up-and-restoring-virtual-machines-using-the-backup-and-restore-api</a><br>
<br>
I got response for<br>
<br>
GET /api/vms/4ef8b995-ae58-49d6-8980-ef0fa6688d92/snapshots/1b94ca4e-8c03-4166-8d29-2b831e24b90e/disks \
HTTP/1.1 Accept: application/xml Content-type: application/xml<br> <br>
<br>
Identify disk id "Array<br>
(<br>
[disk] => Array<br>
(<br>
[0] => Array<br>
(<br>
[actual_size] => 0<br>
[alias] => GlanceDisk-8700235<br>
[format] => cow<br>
[image_id] => \
a42bda58-7556-4ebe-a54d-03dc0a3b1f54<br> [propagate_errors] => false<br>
[provisioned_size] => 8589934592<br>
[read_only] => false<br>
[shareable] => false<br>
[sparse] => true<br>
[status] => ok<br>
[storage_type] => image<br>
[wipe_after_delete] => false<br>
[snapshot] => Array<br>
(<br>
[id] => \
1b94ca4e-8c03-4166-8d29-2b831e24b90e<br> )<br>
<br>
[storage_domains] => Array<br>
(<br>
[storage_domain] => Array<br>
(<br>
[0] => Array<br>
(<br>
[id] => \
ad6aea6d-ff90-457f-98eb-99380949e23a<br> )<br>
<br>
)<br>
<br>
)<br>
<br>
[name] => GlanceDisk-8700235<br>
[description] => CentOS 7 Generic Cloud Image v1711 \
for x86_64 (8700235)<br>
[id] => dded245b-4a73-48b4-a1b4-ba98c37490ad<br>
)<br>
<br>
<br>
<br>
<br>
What is the values that i have to give to the POST request in this api<br>
<br>
<br>
POST /api/vms/22222222-2222-2222-2222-222222222222/disks/ HTTP/1.1<br>
Accept: application/xml<br>
Content-type: application/xml<br>
<br>
<disk id="11111111-1111-1111-1111-111111111111"><br>
<snapshot id="11111111-1111-1111-1111-111111111111"/><br>
<active>true</active><br>
</disk><br>
<br>
to replace <br>
1)vms ===>> 22222222-2222-2222-2222-222222222222<br>
2)disk id 11111111-1111-1111-1111-111111111111<br>
3)snapshot id 11111111-1111-1111-1111-111111111111<br>
_______________________________________________<br>
Devel mailing list -- <a href="mailto:devel@ovirt.org" \
target="_blank">devel@ovirt.org</a><br> To unsubscribe send an email to <a \
href="mailto:devel-leave@ovirt.org" target="_blank">devel-leave@ovirt.org</a><br> \
Privacy Statement: <a href="https://www.ovirt.org/site/privacy-policy/" \
rel="noreferrer" target="_blank">https://www.ovirt.org/site/privacy-policy/</a><br> \
oVirt Code of Conduct: <a \
href="https://www.ovirt.org/community/about/community-guidelines/" rel="noreferrer" \
target="_blank">https://www.ovirt.org/community/about/community-guidelines/</a><br> \
List Archives: <a href="https://lists.ovirt.org/archives/list/devel@ovirt.org/message/OPXOP7OLFGSJ626VEX7ZMRWG5IWKGPWZ/" \
rel="noreferrer" target="_blank">https://lists.ovirt.org/archives/list/devel@ovirt.org/message/OPXOP7OLFGSJ626VEX7ZMRWG5IWKGPWZ/</a><br>
</blockquote></div>
[Attachment #6 (text/plain)]
_______________________________________________
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-leave@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/
List Archives: https://lists.ovirt.org/archives/list/devel@ovirt.org/message/KQGYKHX4SNIV3F6WYCRSYJOA4G7BM43U/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic