Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- python
- Python 3.7.7 (default, Mar 10 2020, 15:43:03)
- [Clang 11.0.0 (clang-1100.0.33.17)] on darwin
- Type "help", "copyright", "credits" or "license" for more information.
- >>>
- >>> import requests
- >>>
- >>> requests.get('https://netbox.url',verify='/my/path/to/cacert.crt')
- <Response [200]>
- >>>
- >>> import pynetbox
- >>> import os
- >>>
- >>> os.environ['REQUESTS_CA_BUNDLE'] = '/my/path/to/cacert.crt'
- >>>
- >>> nb = pynetbox.api(
- ... 'https://netbox.url',
- ... token='XXX',
- ... private_key_file='/my/path/to/key'
- ... )
- >>>
- >>> nb.version
- '2.8'
- >>> nb.dcim.devices.all()
- []
- >>>
- >>> exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement