ipfabric_nornir


Nameipfabric_nornir JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://gitlab.com/ip-fabric/integrations/ipfabric_nornir
SummaryIP Fabric Offical Plugin for nornir
upload_time2023-11-29 16:30:20
maintainer
docs_urlNone
authorIP Fabric Solution Architecture
requires_python>=3.8.1,<4.0.0
licenseApache-2.0
keywords ipfabric ip-fabric community-fabric
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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": "",
    "docs_url": null,
    "requires_python": ">=3.8.1,<4.0.0",
    "maintainer_email": "",
    "keywords": "ipfabric,ip-fabric,community-fabric",
    "author": "IP Fabric Solution Architecture",
    "author_email": "solution.architecture@ipfabric.io",
    "download_url": "https://files.pythonhosted.org/packages/60/e3/b62d557e4e38bf42cd6b2b628297f524b44ed4755418146cf0a9ebcb94b9/ipfabric_nornir-1.0.1.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.1",
    "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": "2ce597678c56f467e202293334167f5f958d86947783c6851f0ca981d165824a",
                "md5": "3d10b770e7df09d86f05892aa52180da",
                "sha256": "c7a4b18f21ebc23b285f7004346191d7ee8e9aa201b021998d59f4f83053162d"
            },
            "downloads": -1,
            "filename": "ipfabric_nornir-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3d10b770e7df09d86f05892aa52180da",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.1,<4.0.0",
            "size": 9330,
            "upload_time": "2023-11-29T16:30:19",
            "upload_time_iso_8601": "2023-11-29T16:30:19.737633Z",
            "url": "https://files.pythonhosted.org/packages/2c/e5/97678c56f467e202293334167f5f958d86947783c6851f0ca981d165824a/ipfabric_nornir-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "60e3b62d557e4e38bf42cd6b2b628297f524b44ed4755418146cf0a9ebcb94b9",
                "md5": "4779eeef99f8009238dd97291b3c489a",
                "sha256": "1faf29fb0dd3c7825491a9bda0b4275b29a12f319f2ffec620ef855a7da56e58"
            },
            "downloads": -1,
            "filename": "ipfabric_nornir-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4779eeef99f8009238dd97291b3c489a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.1,<4.0.0",
            "size": 8627,
            "upload_time": "2023-11-29T16:30:20",
            "upload_time_iso_8601": "2023-11-29T16:30:20.694978Z",
            "url": "https://files.pythonhosted.org/packages/60/e3/b62d557e4e38bf42cd6b2b628297f524b44ed4755418146cf0a9ebcb94b9/ipfabric_nornir-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-29 16:30:20",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "ip-fabric",
    "gitlab_project": "integrations",
    "lcname": "ipfabric_nornir"
}
        
Elapsed time: 0.14948s