<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Paulo/Aline,<br>
<br>
I've been working on the UI for this and ran into some errors.
Therefore, before proceeding, I thought I'd run the curl command
just to make sure I'm able to create this new storage volume w/out
the UI's involvement. Here's the error that I got:<br>
<br>
<img src="cid:part1.05010702.07070702@linux.vnet.ibm.com" alt=""><br>
<br>
I would've thought the API would create whatever was needed in order
to be able to create new storage volume. What am I doing wrong?<br>
<br>
Thanks!<br>
-Socorro<br>
<br>
<br>
<div class="moz-cite-prefix">On 11/11/2015 05:43 AM,
<a class="moz-txt-link-abbreviated" href="mailto:pvital@linux.vnet.ibm.com">pvital@linux.vnet.ibm.com</a> wrote:<br>
</div>
<blockquote
cite="mid:1447249401-28671-1-git-send-email-pvital@linux.vnet.ibm.com"
type="cite">
<pre wrap="">From: Paulo Vital <a class="moz-txt-link-rfc2396E" href="mailto:pvital@linux.vnet.ibm.com"><pvital@linux.vnet.ibm.com></a>
Changes in V2:
* Updated test cases
* Modified dictionary return of parameters
V1:
Add back-end support to create new storage volume (new virtual disk) when
attaching disk to a guest created before.
There are three essential parameters to create the new volume:
* vol: Storage volume name of disk image, that should be 'new_vol'.
* capacity: The total space which can be used to store new volumes.
The unit is bytes.
* format: The format of the defined Storage Volume. Only used when creating
a storage volume with 'capacity'.
To test this patch:
$ curl -k -u test -H "Content-Type: application/json" -H "Accept: application/json" '<a class="moz-txt-link-freetext" href="https://localhost:8001/plugins/kimchi/vms/kimchi-vm-new/storages">https://localhost:8001/plugins/kimchi/vms/kimchi-vm-new/storages</a>' -X POST -d '{ "vol": "new_vol", "type": "disk", "pool": "default", "format": "qcow2", "capacity": 1024 }'
Enter host password for user 'test':
{
"bus":"virtio",
"path":"/var/lib/libvirt/images/2477bfd8-a9e2-4887-a683-e89015b3ba11
-1.img",
"type":"disk",
"dev":"vdb",
"format":"qcow2"
}
$ curl -k -u test -H "Content-Type: application/json" -H "Accept: application/json" '<a class="moz-txt-link-freetext" href="https://localhost:8001/plugins/kimchi/vms/kimchi-vm-new/storages">https://localhost:8001/plugins/kimchi/vms/kimchi-vm-new/storages</a>' -X GET
Enter host password for user 'test':
[
{
"bus":"virtio",
"path":"/var/lib/libvirt/images/2477bfd8-a9e2-4887-a683
-e89015b3ba11-0.img",
"type":"disk",
"dev":"vda",
"format":"qcow2"
},
{
"bus":"virtio",
"path":"/var/lib/libvirt/images/2477bfd8-a9e2-4887-a683
-e89015b3ba11-1.img",
"type":"disk",
"dev":"vdb",
"format":"qcow2"
},
{
"bus":"ide",
"path":"/var/lib/kimchi/tests/ubuntu14.04.iso",
"type":"cdrom",
"dev":"hdc",
"format":"raw"
}
]
Paulo Vital (1):
Create new storage volume when attaching disk to a guest.
src/wok/plugins/kimchi/API.json | 12 ++++++++++++
src/wok/plugins/kimchi/docs/API.md | 6 +++++-
src/wok/plugins/kimchi/i18n.py | 1 +
src/wok/plugins/kimchi/model/vmstorages.py | 28 +++++++++++++++++++++++++++-
src/wok/plugins/kimchi/tests/test_model.py | 25 +++++++++++++++++++++++++
5 files changed, 70 insertions(+), 2 deletions(-)
</pre>
</blockquote>
<br>
</body>
</html>