
Below is the script and getting error while executing. #!/usr/bin/env python # -*- coding: utf-8 -*- import logging import ovirtsdk4 as sdk import ovirtsdk4.types as types logging.basicConfig(level=logging.DEBUG, filename='example.log') connection = sdk.Connection( url='https://pscloud.bnglab.psecure.net/ovirt-engine/api ', username='admin@internal', password='password', ca_file= '/etc/pki/ovirt-engine/ca.pem', debug=True, log=logging.getLogger(), ) vms_service = connection.system_service().vms_service() vms = vms_service.list() for vm in vms: print("%s: %s" % (vm.name, vm.id)) connection.close() ================================================= [root@cephc ovirt-scripts]# python get_vm_names Traceback (most recent call last): File "get_vm_names", line 16, in <module> log=logging.getLogger(), File "/usr/lib64/python2.7/site-packages/ovirtsdk4/__init__.py", line 307, in __init__ raise Error('The CA file \'%s\' doesn\'t exist' % ca_file) ovirtsdk4.Error: The CA file '/etc/pki/ovirt-engine/ca.pem' doesn't exist [root@cephc ovirt-scripts]# On Mon, Sep 24, 2018 at 8:20 PM Staniforth, Paul < P.Staniforth@leedsbeckett.ac.uk> wrote:
Hi Nagaraju,
I meant not signed by a trusted CA, when you install oVirt it signs the certificates with it's own local CA, you can download it the CA certificate for your engine from https://your.engine.address/ovirt-engine/ it you are running the program on your engine machine I think it's in /etc/pki/ovirt-engine/ca.pem
Regards,
Paul S. ------------------------------ *From:* Budur Nagaraju <nbudoor@gmail.com> *Sent:* 24 September 2018 12:20 *To:* Staniforth, Paul *Cc:* users *Subject:* Re: [ovirt-users] Re: vm names export
Am not using any self signed certificate, it was the default certificate installed at the time of ovirt-engine installation , do I need to comment for that also ? Tried commenting the line but still facing issues.
On Mon, Sep 24, 2018 at 4:28 PM Staniforth, Paul < P.Staniforth@leedsbeckett.ac.uk> wrote:
Hi Nagaraju,
if you are using the self-signed certificate have you downloaded your CA certificate, if you are using a certificate from a trusted CA then you should comment or remove the CA file line.
Regards,
Paul S. ------------------------------ *From:* Budur Nagaraju <nbudoor@gmail.com> *Sent:* 24 September 2018 11:16 *To:* Sandro Bonazzola *Cc:* users *Subject:* [ovirt-users] Re: vm names export
Have tried the below URL , getting the below error
Script:
https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/list_vms....
Error:
Thanks, Nagaraju
On Fri, Sep 21, 2018 at 8:50 PM Sandro Bonazzola <sbonazzo@redhat.com> wrote:
Il giorno ven 21 set 2018 alle ore 17:16 Budur Nagaraju < nbudoor@gmail.com> ha scritto:
Hi
I didn't understand, could you please help me on that ?
I was asking Ondra to follow up on your question
Thanks, Nagaraju
On Fri, Sep 21, 2018 at 8:28 PM Sandro Bonazzola <sbonazzo@redhat.com> wrote:
Il giorno gio 20 set 2018 alle ore 09:23 Budur Nagaraju < nbudoor@gmail.com> ha scritto:
HI
We have deployed vms in oVirt , is there a way to export the vm names along with owner names ? any script which would help ?
Ondra?
Thanks, Nagaraju _______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/4GC4RHEQBVGXST...
--
SANDRO BONAZZOLA
MANAGER, SOFTWARE ENGINEERING, EMEA R&D RHV
Red Hat EMEA <https://www.redhat.com/>
sbonazzo@redhat.com <https://red.ht/sig> <https://www.redhat.com/en/events/red-hat-open-source-day-italia?sc_cid=701f2000000RgRyAAK>
--
SANDRO BONAZZOLA
MANAGER, SOFTWARE ENGINEERING, EMEA R&D RHV
Red Hat EMEA <https://www.redhat.com/>
sbonazzo@redhat.com <https://red.ht/sig> <https://www.redhat.com/en/events/red-hat-open-source-day-italia?sc_cid=701f2000000RgRyAAK>
To view the terms under which this email is distributed, please go to:- http://disclaimer.leedsbeckett.ac.uk/disclaimer/disclaimer.html
To view the terms under which this email is distributed, please go to:- http://disclaimer.leedsbeckett.ac.uk/disclaimer/disclaimer.html