[ovirt-users] creation of lun disks

Fabrice Bacchella fabrice.bacchella at orange.fr
Fri May 13 14:21:54 UTC 2016


I'm trying to generated a lun disk, using the python SDK.

My code can be found at https://github.com/fbacchella/ovirtcmd/blob/master/ovlib/disks/__init__.py

If a try to see the content of a existing disk and test with :
print disk.get_type()
print disk.get_storage_type()

I'm getting :
None
lun

Now I try to create another LUN disk with
kwargs['storage_type'] = 'lun'
kwargs['type_'] = 'system'

I'm getting:

> POST /api/disks HTTP/1.1
> <disk>
>     <type>system</type>
>     <interface>virtio-scsi</interface>
>     <lun_storage>
>         <logical_unit id="3600c0ff00026285aed8f355701000000"/>
>     </lun_storage>
>     <storage_type>lun</storage_type>
> </disk>
...
< <fault>
<     <reason>Incomplete parameters</reason>
<     <detail>Storage [type] required for invoke0</detail>
< </fault>

changing to 
    kwargs['type_'] = None 
change nothing, I'm still getting the same error message.

> POST /api/disks HTTP/1.1
> <disk>
>     <interface>virtio-scsi</interface>
>     <lun_storage>
>         <logical_unit id="3600c0ff00026285aed8f355701000000"/>
>     </lun_storage>
>     <storage_type>lun</storage_type>
> </disk>
...
< <fault>
<     <reason>Incomplete parameters</reason>
<     <detail>Storage [type] required for invoke0</detail>
< </fault>


 What did I do wrong ? There is nothing about that in the logs




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20160513/fa3d9a37/attachment-0001.html>


More information about the Users mailing list