Hi Budur,
You can add insecure=True for unsigned certificates. See example
connection = sdk.Connection(
url='https://pscloud.bnglab.psecure.net/ovirt-engine/api ',
username='admin@internal',
password='password',
insecure=True,
ca_file= '/etc/pki/ovirt-engine/ca.pem',
debug=True,
log=logging.getLogger()
)
On 9/24/18 5:08 PM, Budur Nagaraju wrote:
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.
To view the terms under which this email is distributed, please go to:-
From: Budur Nagaraju <nbudoor@gmail.com>
Sent: 24 September 2018 12:20
To: Staniforth, Paul
Cc: users
Subject: Re: [ovirt-users] Re: vm names exportAm 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.
To view the terms under which this email is distributed, please go to:-
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:
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:
HIWe have deployed vms in oVirt , is there a way to export the vm names along with owner names ? any script which would help ?
Ondra?_______________________________________________NagarajuThanks,
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/4GC4RHEQBVGXST5UOLBUNMYOXKKYDSWN/
--
--
http://disclaimer.leedsbeckett.ac.uk/disclaimer/disclaimer.html
http://disclaimer.leedsbeckett.ac.uk/disclaimer/disclaimer.html
_______________________________________________ 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/Z33J5NEDYWLVJPJTSF6R7HRTLXCH3VV7/-- Met vriendelijke groeten, Valentin Bajrami Target Holding