Does PyNetBox API Have An Option To Verify CA Cert For Self Signed Cert?
I've been trying to play around with NetBox Ansible modules with a NetBox setup having self signed certificate. [1] That however gives me the error: Failed to establish connection
Solution 1:
This was discussed in an issue in their GitHub repo where they allege one can set the REQUESTS_CA_BUNDLE
environment variable to point to the CA bundle that requests
should use for verifying the endpoint (here are the requests docs)
In theory:
import pynetbox
import os
os.environ['REQUESTS_CA_BUNDLE'] = '/path/to/your/ca.pem'
# and off to the races
Solution 2:
You can disable ssl verification like so:
nb.http_session.verify = False
It's mentioned in the docs here https://buildmedia.readthedocs.org/media/pdf/pynetbox/latest/pynetbox.pdf
Post a Comment for "Does PyNetBox API Have An Option To Verify CA Cert For Self Signed Cert?"