ipfabric_nornir
==============
## About
Founded in 2015, [IP Fabric](https://ipfabric.io/) develops network infrastructure visibility and analytics solution to
help enterprise network and security teams with network assurance and automation across multi-domain heterogeneous
environments. From in-depth discovery, through graph visualization, to packet walks and complete network history, IP
Fabric enables to confidently replace manual tasks necessary to handle growing network complexity driven by relentless
digital transformation.
# Special Thanks
This project is an IP Fabric officially supported fork of
[nornir_ipfabric](https://github.com/routetonull/nornir_ipfabric) by [routetonull](https://github.com/routetonull/). Thank you for your work!
# Install
The recommended way to install `ipfabric_nornir` is via pip
```sh
pip install ipfabric_nornir
```
# Requirements
An instance of [IP Fabric](https://ipfabric.io/) is required to collect information.
# Example usage
## Setup
### Using environment variables
Set environment vars to provide url and credentials to connect to the IP Fabric server
```sh
export IPF_URL=https://ipfabric.local
export IPF_TOKEN=myToken
# Or Username and Password
export IPF_USER=admin
export IPF_PASSWORD=mySecretPassword
```
### Using `.env` file
The easiest way to use this package is with a `.env` file. You can copy the sample and edit it with your environment variables.
```commandline
cp sample.env .env
```
This contains the following variables which can also be set as environment variables instead of a .env file.
```
IPF_URL="https://demo3.ipfabric.io"
IPF_TOKEN=TOKEN
IPF_VERIFY=true
```
Or if using Username/Password:
```
IPF_URL="https://demo3.ipfabric.io"
IPF_USERNAME=USER
IPF_PASSWORD=PASS
```
## Running
```python
from nornir import InitNornir
nr = InitNornir(inventory={"plugin": "IPFabricInventory"})
```
## Using the InitNornir function
Init
```python
from nornir import InitNornir
nr = InitNornir(
inventory={
"plugin": "IPFabricInventory",
"options": {
"base_url": "https://ipfabric.local",
"token": "Token", # or "username":"admin", "password":"mySecretPassword",
"verify": True,
"platform_map": "netmiko", # "netmiko" (Default), "napalm", or "genie",
"default": {"username": "device_username", "password": "device_password"},
},
},
)
```
## Using the Nornir configuration file
File *config.yaml*
```yaml
---
inventory:
plugin: IPFInventory
options:
base_url: "https://ipfabric.local"
token: "TOKEN"
# username: "admin"
# password: "mySecretPassword"
verify: true
platform_map: netmiko # "netmiko", "napalm", or "genie"
default:
username: 'device_username'
password: 'device_password'
```
Usage:
```python
from nornir import InitNornir
nr = InitNornir(config_file="config.yaml", inventory={"plugin": "IPFabricInventory"})
```
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/ip-fabric/integrations/ipfabric_nornir",
"name": "ipfabric_nornir",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0.0,>=3.8.1",
"maintainer_email": null,
"keywords": "ipfabric, ip-fabric, community-fabric",
"author": "IP Fabric Solution Architecture",
"author_email": "solution.architecture@ipfabric.io",
"download_url": "https://files.pythonhosted.org/packages/c2/65/7ddbafea8e54848b1bdc78e02811778e2299c826caf68219e87bb5e37ded/ipfabric_nornir-1.0.2.tar.gz",
"platform": null,
"description": "ipfabric_nornir\n==============\n\n## About\n\nFounded in 2015, [IP Fabric](https://ipfabric.io/) develops network infrastructure visibility and analytics solution to\nhelp enterprise network and security teams with network assurance and automation across multi-domain heterogeneous\nenvironments. From in-depth discovery, through graph visualization, to packet walks and complete network history, IP\nFabric enables to confidently replace manual tasks necessary to handle growing network complexity driven by relentless\ndigital transformation.\n\n# Special Thanks\n\nThis project is an IP Fabric officially supported fork of \n[nornir_ipfabric](https://github.com/routetonull/nornir_ipfabric) by [routetonull](https://github.com/routetonull/). Thank you for your work!\n\n\n# Install\n\nThe recommended way to install `ipfabric_nornir` is via pip\n\n```sh\npip install ipfabric_nornir\n```\n\n# Requirements\n\nAn instance of [IP Fabric](https://ipfabric.io/) is required to collect information.\n\n\n# Example usage\n\n## Setup\n\n### Using environment variables\n\nSet environment vars to provide url and credentials to connect to the IP Fabric server\n\n```sh\nexport IPF_URL=https://ipfabric.local\nexport IPF_TOKEN=myToken\n\n# Or Username and Password\nexport IPF_USER=admin\nexport IPF_PASSWORD=mySecretPassword\n```\n\n### Using `.env` file\n\nThe easiest way to use this package is with a `.env` file. You can copy the sample and edit it with your environment variables. \n\n```commandline\ncp sample.env .env\n```\n\nThis contains the following variables which can also be set as environment variables instead of a .env file.\n```\nIPF_URL=\"https://demo3.ipfabric.io\"\nIPF_TOKEN=TOKEN\nIPF_VERIFY=true\n```\n\nOr if using Username/Password:\n```\nIPF_URL=\"https://demo3.ipfabric.io\"\nIPF_USERNAME=USER\nIPF_PASSWORD=PASS\n```\n\n## Running\n\n```python\nfrom nornir import InitNornir\nnr = InitNornir(inventory={\"plugin\": \"IPFabricInventory\"})\n```\n\n\n## Using the InitNornir function\n\nInit\n\n```python\nfrom nornir import InitNornir\nnr = InitNornir(\n inventory={\n \"plugin\": \"IPFabricInventory\",\n \"options\": {\n \"base_url\": \"https://ipfabric.local\",\n \"token\": \"Token\", # or \"username\":\"admin\", \"password\":\"mySecretPassword\",\n \"verify\": True,\n \"platform_map\": \"netmiko\", # \"netmiko\" (Default), \"napalm\", or \"genie\",\n \"default\": {\"username\": \"device_username\", \"password\": \"device_password\"},\n },\n },\n)\n```\n\n## Using the Nornir configuration file\n\nFile *config.yaml*\n\n```yaml\n---\ninventory:\n plugin: IPFInventory\n options:\n base_url: \"https://ipfabric.local\"\n token: \"TOKEN\"\n # username: \"admin\"\n # password: \"mySecretPassword\"\n verify: true\n platform_map: netmiko # \"netmiko\", \"napalm\", or \"genie\"\n default:\n username: 'device_username'\n password: 'device_password'\n```\n\nUsage:\n\n```python\nfrom nornir import InitNornir\nnr = InitNornir(config_file=\"config.yaml\", inventory={\"plugin\": \"IPFabricInventory\"})\n```\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "IP Fabric Offical Plugin for nornir",
"version": "1.0.2",
"project_urls": {
"Changelog": "https://gitlab.com/ip-fabric/integrations/ipfabric_nornir/-/blob/main/CHANGELOG.md",
"Homepage": "https://gitlab.com/ip-fabric/integrations/ipfabric_nornir",
"IP Fabric": "https://ipfabric.io/",
"Repository": "https://gitlab.com/ip-fabric/integrations/ipfabric_nornir"
},
"split_keywords": [
"ipfabric",
" ip-fabric",
" community-fabric"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e257813992bbc86d82971403fd4a75702e3b226af70bdca828bbe0c6ce3cd3dc",
"md5": "0c8b4aee62e122c7331be860a7c3b686",
"sha256": "bfae5e942715ed17d241c88861213a130c00364acf33bd804ca6b8201782712b"
},
"downloads": -1,
"filename": "ipfabric_nornir-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0c8b4aee62e122c7331be860a7c3b686",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0.0,>=3.8.1",
"size": 9345,
"upload_time": "2024-05-06T15:22:56",
"upload_time_iso_8601": "2024-05-06T15:22:56.186243Z",
"url": "https://files.pythonhosted.org/packages/e2/57/813992bbc86d82971403fd4a75702e3b226af70bdca828bbe0c6ce3cd3dc/ipfabric_nornir-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c2657ddbafea8e54848b1bdc78e02811778e2299c826caf68219e87bb5e37ded",
"md5": "3e3e889e0030899e9633f06a9df9d942",
"sha256": "809f9d5c0c2cdcd92acb93e295e4806687927553de1689648a2d1d9108b27ebd"
},
"downloads": -1,
"filename": "ipfabric_nornir-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "3e3e889e0030899e9633f06a9df9d942",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0.0,>=3.8.1",
"size": 8628,
"upload_time": "2024-05-06T15:22:58",
"upload_time_iso_8601": "2024-05-06T15:22:58.003856Z",
"url": "https://files.pythonhosted.org/packages/c2/65/7ddbafea8e54848b1bdc78e02811778e2299c826caf68219e87bb5e37ded/ipfabric_nornir-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-06 15:22:58",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "ip-fabric",
"gitlab_project": "integrations",
"lcname": "ipfabric_nornir"
}