Hi Jorge,Lately DEV started to implement the capability of passing the basic arguments for the SDK example scripts with a help of configuration file.I assume that not all of the example scripts support this new feature yet.Until now you had to run the examples with:
--engine-url https://engine1
--username admin@internal
--password-file /path/to/engine1-password
--cafile /path/to/engine1.pem
This is very painful when running the example a lot.
Now you can run them with:
-c engine1
Assuming that you have a configuration file with all the
details at:
~/.config/ovirt.confHere is an example for you of how this file should look like:[engine1]
engine_url = https://<engine FQDN>
username = admin@internal
password = xxxxxx
cafile = /path/to/engine1.pemOn Wed, Dec 30, 2020 at 4:18 AM Jorge Visentini <jorgevisentini@gmail.com> wrote:Hi All._______________________________________________
I'm using version 4.4.4 (latest stable version - ovirt-node-ng-installer-4.4.4-2020122111.el8.iso)
I tried using the upload_disk.py script, but I don't think I knew how to use it.
When I try to use it, these errors occur:
python3 /usr/share/doc/python3-ovirt-engine-sdk4/examples/upload_disk.py disk01-SO.qcow2 --disk-format qcow2 --sd-name ISOs
usage: upload_disk.py [-h] -c CONFIG [--debug] [--logfile LOGFILE]
[--disk-format {raw,qcow2}] [--disk-sparse]
[--enable-backup] --sd-name SD_NAME [--use-proxy]
[--max-workers MAX_WORKERS] [--buffer-size BUFFER_SIZE]
filename
upload_disk.py: error: the following arguments are required: -c/--config
Using the upload_disk.py help:
python3 upload_disk.py --help
-c CONFIG, --config CONFIG
Use engine connection details from [CONFIG] section in
~/.config/ovirt.conf.
This CONFIG, is the API access configuration for authentication? Because analyzing the script I did not find this information.Does this new version work differently or am I doing something wrong?
In the sdk_4.3 version of upload_disk.py I had to change the script to add the access information, but it worked.
[root@engineteste01 ~]# python3 upload_disk.py disk01-SO.qcow2
Checking image...
Disk format: qcow2
Disk content type: data
Connecting...
Creating disk...
Creating transfer session...
Uploading image...
Uploaded 20.42%
Uploaded 45.07%
Uploaded 68.89%
Uploaded 94.45%
Uploaded 2.99g in 42.17 seconds (72.61m/s)
Finalizing transfer session...
Upload completed successfully
[root@engineteste01 ~]#Thank you all!!--Att,Jorge Visentini
+55 55 98432-9868
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-leave@ovirt.org
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/users@ovirt.org/message/PYNCYYFNT42NEHBXD57V3MMMUP3LZRZA/
--Thanks--With Respect,Ilan Zuckerman, ISTQB, ANSIBLE SPECIALIST, RHCE
RHV-M
STORAGE AUTOMATION QE
Israel
izuckerm@redhat.com T: +972-9-7692000
M: 054-9956728 IM: izuckerm