SkillAgentSearch skills...

Netpalm

ReST based network device broker

Install / Use

/learn @tbotnz/Netpalm

README

<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

  • Speaks REST and JSON RPC northbound, then CLI over SSH or Telnet or NETCONF/RESTCONF southbound to your network devices
  • Turns any Python script into a easy to consume, asynchronous and documented API with webhook support
  • Large amount of supported network device vendors thanks to napalm, netmiko, ncclient and requests
  • Built in multi-level abstraction interface for network service lifecycle functions for create, retrieve and delete and validate
  • In band service inventory
  • Ability to write your own service models and templates using your own existing jinja2 templates
  • Well documented API with postman collection full of examples and every instance gets it own self documenting openAPI 3 UI.
  • Supports pre- and post-checks across CLI devices raising exceptions and not deploying config as required
  • Multiple ways to queue jobs to devices, either pinned strict (prevent connection pooling at device)or pooled first in first out
  • Modern, container based scale out architecture supported by every component
  • Highly configurable for all aspects of the platform
  • Leverages an encrypted Redis layer providing caching and queueing of jobs to and from devices

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

  • Jinja2

  • Parsers

    • TextFSM support via netmiko
    • NTC-templates for parsing/structuring device data (includes)
    • TTP Template Text Parser - Jinja2-like parsing of semi-structured CLI data
    • Napalm getters
    • Genie support via netmiko
    • Automated download and installation of TextFSM templates from http://textfsm.nornir.tech online TextFSM development tool
    • Optional dynamic rendering of Netconf XML data into JSON
  • Webhooks

    • Comes with standard REST webhook which supports data transformation via your own jinja2 template
    • Supports you to bring your own (BYO) webhook scripts
  • Scripts

    • Execute ANY python script as async via the ReST API and includes passing in of parameters
    • Supports pydantic models for data validation and documentation
  • Queueing

    • Supports a "pinned" queueing strategy where a dedicated process and queue is established for your device, tasks are sync queued and processed for that device
    • Supports a "fifo" pooled queueing strategy where a pool of workers
    • Supports on the fly changes to the async queue strategy for a device
  • Caching

    • Can cache responses from devices so that the same request doesn't have to go back to the device
    • Automated cache poisioning on config changes on devices
  • Scaling

    • Horizontal container based scale out architecture supported by each component

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,

View on GitHub
GitHub Stars451
CategoryDevelopment
Updated24d ago
Forks53

Languages

Python

Security Score

100/100

Audited on Mar 7, 2026

No findings