nornir_ipfabric plugin for nornir
Project description
nornir_ipfabric
IPFabric Inventory plugin for nornir.
Install
The recommended way to install nornir_ipfabric is via pip
pip install nornir-ipfabric
Requirements
An instance of IP Fabric is required to collect information. Request trial license.
Example usage
Using env vars
Set environment vars to provide url and credentials to connect to the IP Fabric server
export IPF_URL=https://ipfabric.local
export IPF_USER=admin
export IPF_PASSWORD=mySecretPassword
If IP Fabric version 3.7 or above is in use, token authentication is available
export IPF_URL=https://ipfabric.local
export IPF_TOKEN=myToken
from nornir import InitNornir
nr = InitNornir(inventory={"plugin": "IPFabricInventory"})
Using the InitNornir function
Init with credentials
from nornir import InitNornir
nr = InitNornir(
inventory=
{
"plugin": "IPFabricInventory",
"options": {
"ipf_url":"https://ipfabric.local",
"ipf_user":"admin",
"ipf_password":"mySecretPassword",
},
},
)
Init with token
from nornir import InitNornir
nr = InitNornir(
inventory=
{
"plugin": "IPFabricInventory",
"options": {
"ipf_url":"https://ipfabric.local",
"ipf_token":"myToken",
},
},
)
Using the Nornir configuration file
File config.yaml with credendials
---
inventory:
plugin: IPFInventory
options:
ipf_url: "https://ipfabric.local"
ipf_user: "admin"
ipf_password: "mySecretPassword"
File config.yaml with token
---
inventory:
plugin: IPFInventory
options:
ipf_url: "https://ipfabric.local"
ipf_token: "myToken"
Usage:
from nornir import InitNornir
nr = InitNornir(config_file="config.yaml",inventory={"plugin": "IPFabricInventory"})
Useful Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
File details
Details for the file nornir_ipfabric-0.1.4-py3.8.egg
.
File metadata
- Download URL: nornir_ipfabric-0.1.4-py3.8.egg
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | adc1f84560da592bb7671f6edd5892c1c8d40e4a2b4f9631a6d16275735eb07d |
|
MD5 | d8da90262f8cd6c24b613051bee56cd7 |
|
BLAKE2b-256 | f2bbec4200f4af553803f048bb05d737e6838d1054ae60b72c83103aca6d7ecc |
File details
Details for the file nornir_ipfabric-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: nornir_ipfabric-0.1.4-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e92197d8695669fcbab15a6d931e2df4a8a2b95a38a812f376ea3a7578b3e958 |
|
MD5 | 7a9c3e77e92f94589b7cc1532935d0f9 |
|
BLAKE2b-256 | 909214832e428d8420381dfe8fecaa96660c7c294f93726eaab222b75856506b |