Skip to main content

IP Fabric Offical Plugin for nornir

Project description

ipfabric_nornir

IP Fabric

IP Fabric is a vendor-neutral network assurance platform that automates the holistic discovery, verification, visualization, and documentation of large-scale enterprise networks, reducing the associated costs and required resources whilst improving security and efficiency.

It supports your engineering and operations teams, underpinning migration and transformation projects. IP Fabric will revolutionize how you approach network visibility and assurance, security assurance, automation, multi-cloud networking, and trouble resolution.

Integrations or scripts should not be installed directly on the IP Fabric VM unless directly communicated from the IP Fabric Support or Solution Architect teams. Any action on the Command-Line Interface (CLI) using the root, osadmin, or autoboss account may cause irreversible, detrimental changes to the product and can render the system unusable.

Special Thanks

This project is an IP Fabric officially supported fork of nornir_ipfabric by routetonull. Thank you for your work!

Install

The recommended way to install ipfabric_nornir is via pip

pip install ipfabric_nornir

Requirements

An instance of IP Fabric 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

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.

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

from nornir import InitNornir
nr = InitNornir(inventory={"plugin": "IPFabricInventory"})

Using the InitNornir function

Init

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

---
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:

from nornir import InitNornir
nr = InitNornir(config_file="config.yaml", inventory={"plugin": "IPFabricInventory"})

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ipfabric_nornir-1.0.3b0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ipfabric_nornir-1.0.3b0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file ipfabric_nornir-1.0.3b0.tar.gz.

File metadata

  • Download URL: ipfabric_nornir-1.0.3b0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: poetry/2.1.3 CPython/3.12.11 Linux/6.1.0-37-amd64

File hashes

Hashes for ipfabric_nornir-1.0.3b0.tar.gz
Algorithm Hash digest
SHA256 5455b8bd48fce082eeb14d124e6bef9a3c4e534ffc9a8896119f077dd80a4abe
MD5 9c379d99523cc2de1bdb2c2f16daa01a
BLAKE2b-256 ee80688ad1079bfc8d65f8a5bc2e612fdaf838b2807ed348c56820eb0115f931

See more details on using hashes here.

File details

Details for the file ipfabric_nornir-1.0.3b0-py3-none-any.whl.

File metadata

  • Download URL: ipfabric_nornir-1.0.3b0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: poetry/2.1.3 CPython/3.12.11 Linux/6.1.0-37-amd64

File hashes

Hashes for ipfabric_nornir-1.0.3b0-py3-none-any.whl
Algorithm Hash digest
SHA256 b03b409ba958e4af138d5ab9a187a20a73ab79c12803f0849dceb30416d19d4e
MD5 52077ba09c8d3518031d9b0d2dbb9d91
BLAKE2b-256 e07fc710feb0f3c7b18100b57f890a6ce2f86c695e3a0a8f9726e33465c3bb85

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page