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




_______________________________________________
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users

Reply via email to