thanks
now all works fine with 4.3.2
2020-03-25 3:13 GMT+04:00, Nir Soffer <nsoffer(a)redhat.com>:
> On Tue, Mar 24, 2020 at 8:13 AM David David <dd432690(a)gmail.com> wrote:
>>
>> hi
>> can't upload disk image with that script:
>>
https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/upload...
>> this error message is appeared when i trying to upload image:
>> # python upload_disk.py --engine-url
https://alias-e.localdomain
>> --username admin@internal --disk-format raw --sd-name iscsi-test-7 -c
>> ca.pem /home/linux1.raw
>> Checking image...
>> Image format: raw
>> Disk format: raw
>> Disk content type: data
>> Disk provisioned size: 42949672960
>> Disk initial size: 42949672960
>> Disk name: linux1.raw
>
> Based on this, you are using upload_disk.py from ovirt-engine-sdk 4.4...
>
>> Connecting...
>> Password:
>> Creating disk...
>> Creating transfer session...
>> Uploading image...
>> Traceback (most recent call last):
>> File "upload_disk.py", line 288, in <module>
>> with ui.ProgressBar() as pb:
>> TypeError: __init__() takes at least 2 arguments (1 given)
>
> Which was tested with ovirt-imageio-common 1.6.3, but not with the
> version from ovirt 4.3 (1.5.3).
>
> The issue is removed argument in ui.ProgressBar() that is not needed in
> 4.4.
>
> Since you have 4.3.8 system, you should use upload_disk.py from SDK
> version 4.3.2.
>
> upload_disk.py from 4.3.2 is:
>
https://raw.githubusercontent.com/oVirt/ovirt-engine-sdk/fbc9642a38a14107...
>
> If you want new features added after that release during ovirt 4.4.
> development, and you
> are ok with using less tested code you can try to use the last version
> of upload_disk.py
> that was compatible with 4.3 version of ovirt-imageio-common:
>
https://raw.githubusercontent.com/oVirt/ovirt-engine-sdk/b4c37ad3881b1765...
>
> Regardless please file ovirt-imageio bug. We want to keep the example
> scripts compatible with earlier
> versions if possible.
>
https://bugzilla.redhat.com/enter_bug.cgi?product=ovirt-imageio
>
>> software using:
>> ovirt-engine 4.3.8.2-1
>> python-ovirt-engine-sdk4-4.3.2-2
>
> Nir
>
>