GithubHelp home page GithubHelp logo

jevgenious / netpalm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tbotnz/netpalm

0.0 1.0 0.0 2.01 MB

ReST based network device broker

License: BSD 3-Clause "New" or "Revised" License

Dockerfile 0.66% Python 99.34%

netpalm's Introduction

netpalm_log

Why NetPalm? netpalm is a ReST API into your dusty old network devices, netpalm makes it easy to push and pull network state from your apps. netpalm can abstract and render structured data both inbound and outbound to your network devices native telnet, SSH, NETCONF or RESTCONF interface. NetPalm leverages popular napalm, netmiko, ncclient and requests library's for network device communication, these powerful libs supprt a vast number of vendors and OS

Netpalm Features

  • Talks a Rest API to your app and CLI/NETCONF/RESTCONF to your network devices
  • Provides a multi-level abstraction interface for service modeling of Create, Retrieve, Delete methods
  • Ability to write your own service templates
  • Per device task queuing (Ensure you dont overload your VTY's)
  • Large amount of supported multivendor devices ( cheers to the netmiko & napalm & ncclient lads )
  • Supports TextFSM for parsing/structuring device data (includes ntc-templates)
  • Supports Jinja2 for model driven deployments of config onto devices accross napalm, netmiko and ncclient
  • Can be used to execute any python script via the ReST API and includes passing in of parameters
  • Includes large postman collection of examples
  • Supports automated download and installation of TextFSM templates from http://textfsm.nornir.tech online TextFSM development tool
  • Automatically generates a JSON schema for any Jinja2 Template
  • Can render NETCONF XML responses into JSON on the fly
  • Can render Jinja2 templates only if required via the API
  • Asynchronous parallel processing
  • Task oriented

Concepts

Netpalm acts as a ReST broker for NAPALM, Netmiko, NCCLIENT or a Python Script. It uses TextFSM or Jinja2 to model and transform both ingress and egress data if required. You make an API call to netpalm and it will establish a queue to your device and start sending configuration

netpalm concept

Using Netpalm

API catalog

Please view the API docs here

Postman example - getconfig method

netpalm eg1

check response

netpalm eg2

Postman example - getconfig method with textfsm arg

netpalm also supports all arguments for the transport libs, simply pass them in as below

netpalm eg3

check response

netpalm eg4

Rapid template development and deployment

netpalm is integrated into http://textfsm.nornir.tech so you can ingest your templates with ease

netpalm auto ingest

Included Postman Collection

netpalm comes bundled with a postman collection to make it easy to get going

netpalm postman

Container Installation

ensure you first have docker installed

sudo apt-get install docker.io
sudo apt-get install docker-compose

clone in netpalm

git clone https://github.com/tbotnz/netpalm.git
cd netpalm

build container

sudo docker build -t netpalm .
sudo docker-compose up -d

import the postman collection, set the ip addresses to that of your docker host and off you go (default netpalm port is 9000)

http://$(yourdockerhost):9000

Configuring Netpalm

edit the config.json file too set params as required

{
    "apikey": "2a84465a-cf38-46b2-9d86-b84Q7d57f288",
    "listen_port": 9000,
    "listen_ip":"0.0.0.0",
    "redis_task_ttl":500,
    "redis_task_timeout":500,
    "redis_server":"redis",
    "redis_port":6379,
    "redis_core_q":"process",
    "txtfsm_index_file":"backend/plugins/ntc-templates/index",
    "txtfsm_template_server":"http://textfsm.nornir.tech",
    "custom_scripts":"backend/plugins/custom_scripts/",
    "jinja2_templates":"backend/plugins/jinja2_templates/"
}

Useful Netpalm Resources

Netpalm getting started blog:

Netpalm slack channel

#netpalm on networktocode.slack.com

License

All code belongs to that of its respective owners

netpalm's People

Contributors

tbotnz avatar wrgeorge1983 avatar lboue avatar

Watchers

James Cloos avatar

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.