Home

Awesome

<p align="center"> <br/> <img src="/static/images/np_new.png" /> <br/> <h3 align="center">The Open API Platform for Network Devices</h3> <br/> <p align="center"> netpalm makes it easy to push and pull state from your apps to your network by providing multiple southbound drivers, abstraction methods and modern northbound interfaces such as open API3 and REST webhooks. </p> <p align="center" style="align: center;"> <img src="https://github.com/tbotnz/netpalm/workflows/tests/badge.svg" alt="Tests"/> <a href="https://networktocode.slack.com" alt="NTC Slack"><img src="https://img.shields.io/badge/slack-networktocode-orange" alt="NTC Slack" /></a> <img src="https://img.shields.io/github/issues/tbotnz/netpalm" alt="Github Issues" /> <img src="https://img.shields.io/github/issues-pr/tbotnz/netpalm" alt="Github Pull Requests" /> <img src="https://img.shields.io/github/stars/tbotnz/netpalm" alt="Github Stars" /> <img src="https://img.shields.io/github/contributors-anon/tbotnz/netpalm" alt="Github Contributors" /> <img src="https://img.shields.io/github/v/release/tbotnz/netpalm?include_prereleases" alt="Github Release" /> <img src="https://img.shields.io/github/license/tbotnz/netpalm" alt="License" /> </p> </p> <h2 align="center">Supporting netpalm</h2> <!--sponsors start--> <table> <tbody> <tr> <td align="center" valign="middle"> <a href="https://www.apcela.com" target="_blank"> <img width="222px" src="https://www.apcela.com/wp-content/uploads/2020/11/apcela-white-black.png" alt="Apcela" /> </a><br /> <div>Apcela</div><br /> <i><sub>Because Enterprise Speed Matters</sub></i> </td> <td align="center" valign="middle"> <a href="https://www.bandwidth.com" target="_blank"> <img width="222px" src="https://www.bandwidth.com/wp-content/uploads/BW_tm_RGB_horO_Blue.png" alt="Bandwidth" /> </a><br /><br /><br /> <i><sub>Delivering the power to communicate</sub></i> </td> <td align="center" valign="middle"> <a href="mailto:tonynealon1989@gmail.com" target="_blank"> <img width="120px" src="https://imgur.com/X1gKuY0.png" alt="Support" /> <br /> <div>Maybe you?</div></a> </td> <!-- <td align="center" valign="middle"> <a href="#" target="_blank"></a> </td> --> </tr><tr></tr> </tbody> </table> <!--sponsors end-->

Table of Contents

What is netpalm?

Leveraging best of breed open source network components like napalm, netmiko, ncclient and requests, netpalm makes it easy to abstract from any network devices native telnet, SSH, NETCONF or RESTCONF interface into a modern model driven open api 3 interface.

<p align="center"> <img src="/static/images/np-basic-new1.png"> </p>

Taking a platform based approach means netpalm allows you to bring your own jinja2 config, service and webhook templates, python scripts and webhooks for quick adoption into your existing devops workflows.

Built on a scalable microservice based architecture netpalm provides unparalleled scalable API access into your network.

Features

Concepts

Basic Concepts

netpalm acts as a ReST broker and abstraction layer for NAPALM, Netmiko, NCCLIENT or a Python Script. netpalm uses TextFSM or Jinja2 to model and transform both ingress and egress data if required.

<p align="center"> <img src="/static/images/np-basic-overview.png"> </p>

Component Concepts

netpalm is underpinned by a container based scale out architecture for all components.

<p align="center"> <img src="/static/images/np-component.png"> </p>

Queueing Concepts

netpalm provides domain focused queueing strategy for task execution on network equipment.

<p align="center"> <img src="/static/images/np-basic-q.png"> </p>

Scaling Concepts

Every netpalm container can be scaled in and out as required. Kubernetes or Swarm is recommended for any large scale deployments.

<p align="center"> <img src="/static/images/np-scale-out.png"> </p>

To scale out the basic included compose deployment use the docker-compose command

docker-compose scale netpalm-controller=1 netpalm-worker-pinned=2 netpalm-worker-fifo=3

Additional Features

Examples

We could show you examples for days, but we recommend playing with the online postman collection to get a feel for what can be done. We also host a public instance where you can test netpalm via the Swagger UI.

<details> <summary style="display:inline-block;" markdown="span"><strong><code>getconfig</code> method</strong></summary>

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

netpalm eg3

</details> <details> <summary style="display:inline-block;" markdown="block"><strong style="display:inline-block;">check response</strong></summary>

netpalm eg4

</details> <details> <summary style="display:inline-block;"><strong style="display:inline-block;">ServiceTemplates</strong></summary>

netpalm supports model driven service templates, these self render an OpenAPI 3 interface and provide abstraction and orchestration of tasks across many devices using the get/setconfig or script methods.

The below example demonstrates basic SNMP state orchestration across multiple devices for create, retrieve, delete

netpalm auto ingest

</details> <details> <summary><strong style="display:inline-block;">Template Development and Deployment</strong></summary>

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

netpalm auto ingest

</details>

API Docs

netpalm comes with a Postman Collection and an OpenAPI based API with a SwaggerUI located at http://localhost:9000/ after starting the container.

netpalm swagger

Caching

Configuration

Edit the config/config.json file to change any parameters ( see defaults.json for example )

Installation

  1. Ensure you first have docker installed
sudo apt-get install docker.io
sudo apt-get install docker-compose
  1. Clone this repository
git clone https://github.com/tbotnz/netpalm.git
cd netpalm
  1. Build the container
sudo docker-compose up -d --build
  1. After the container has been built and started, you're good to go! netpalm will be available on port 9000 under your docker hosts IP.
http://$(yourdockerhost):9000

Further Reading

Contributing

We are open to contributions, before making a PR, please make sure you've read our CONTRIBUTING.md document.

You can also find us in the channel #netpalm on the networktocode Slack.