https://ovirt.github.io/ovirt-engine-api-model/4.5/#services/disks
POST /ovirt-engine/api/disks
<disk>
<storage_domains>
<storage_domain id="123"/>
</storage_domains>
<name>mydisk</name>
<provisioned_size>1048576</provisioned_size>
<format>cow</format>
</disk>
First off <storage_domain id="123"/> as a field is ridiculous because there is
no JSON equivalent I can determine.
Next
Why is this a good XML structure?
<storage_domains><storage_domain><name>MyStorageDomainName</name></storage_domain></storage_domains>
But this is not
<storage_domains><storage_domain><id>7aaa2d33-c7ba-46f0-b4fd-4cf48a724e8d</id></storage_domain></storage_domains>
Next when trying to create a new disk directly on a VM
POST /ovirt-engine/api/vms/396bc7c9-ed4a-4209-b9fd-f93e9a47cd31/diskattachments
Name works for XML:
<disk_attachment>
<bootable>true</bootable>
<interface>virtio</interface>
<active>true</active>
<disk>
<description>Boot Disk</description>
<format>cow</format>
<name>mybootdisk</name>
<provisioned_size>1048576</provisioned_size>
<storage_domains>
<storage_domain>
<name>MyStorageDomainName</name>
</storage_domain>
</storage_domains>
</disk>
</disk_attachment>
But Not for JSON
{
"bootable": "true",
"interface": "virtio",
"active": "true",
"disk": {
"description": "Boot Disk",
"format": "cow",
"name": "mybootdisk",
"provisioned_size": "1048576",
"storage_domains": {
"storage_domain": {
"name":
"MyStorageDomainName"
}
}
}
}
And ID fails for both
I think the REST API for creating disks needs some real help. They are
deprecating the only one that actually works right
/ovirt-engine/api/storagedomains/123/disks
Does anyone have the correct syntax in JSON, because the available
documentation is almost entirely devoid of any, AND the server response.....
wait for it...... "The remote server returned an error: (400) Bad Request."
.....that is all
_______________________________________________
Users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
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/[email protected]/message/KOUBL2E42LBQ3ZW7VV42Q6FVK6MZ6VCN/