On Wednesday, 26 May 2021 04:27:27 CEST Pascal D wrote:
I am unable to create disk using JSON however the same query in XML
works
great. In Json I get the following message back:
{
"reason": "Request syntactically incorrect."
}
Both use POST /ovirt-engine/api/disks and the content-type is either
application/json or application/xml
Here is the request in JSON:
{
"id": "866770c3-acf9-4f67-b72c-05ed241908e4",
"name": "mydisk",
"description": "test disk",
"bootable": false,
"shareable": true,
"provisioned_size": 10240000000,
"interface": "virtio",
"format": "cow",
"storage_domains": {
"storage_domain": {
"name": "VMS"
}
}
}
I didn't try, but I guess you need
{
disk = {
"id": "....",
...
}
}
And here it is in XML
<disk id="866770c3-acf9-4f67-b72c-05ed241908e4">
<bootable>false</bootable>
<name>mydisk</name>
<description>test Drive</description>
<interface>virtio</interface>
<provisioned_size>10240000000</provisioned_size>
<format>cow</format>
<storage_domains>
<storage_domain>
<name>VMS</name>
</storage_domain>
</storage_domains>
</disk>
_______________________________________________
Users mailing list -- users(a)ovirt.org
To unsubscribe send an email to users-leave(a)ovirt.org
Privacy Statement:
https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct:
https://www.ovirt.org/community/about/community-guidelines/ List Archives:
https://lists.ovirt.org/archives/list/users@ovirt.org/message/S7PPYRFB5AIRR
BW5PMNTCMB2PTIF6FT2/