Coder Social home page Coder Social logo

nornir_ipfabric's Introduction

Stars

LastCommit

Version

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

nornir_ipfabric's People

Contributors

routetonull avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

dsaimon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.