Friday 2 July 2021

Junos Automation Stack

 



  • Processes required for automating junos devices are mgd(management process) and jsd(jet service processes)
  • mgd handles automation requests invloving junox XML APi, Yang, Rest API
  • jsd handles automation requuests involving Juniper Extension Toolkit(JET) API.

Junos has rich set of API - XML API(using NETCONF protocol) , REST API, JET API.

XML API:
========
junos xml api uses netconf protocol for off box automation
netconf is a open standard and uses xml to transmit documents
it provides mechanisms to install, manipulate and delete config of network devices using 
xml and rpc calls

On Box scripting:

XSLT - standard language for processing xml data
SLAX - to convert alternate syntax to xslt
python - using pyez libraries

Types of scripts:

Commit scripts.
Op scripts
Event scripts
snmp scripts


NETCONF:
- uses SSH
- messages formatted in xml and yang


Uses below libraries to make life easier

- Ruby, Python, Perl, Java

Juniper PYEZ(Python libraries):

- automatically parses XML outpurs
- file system utilities
- converts xml into python objects
- takes care of parsing all XML RPC outputs

REST API:
========

locates transfer and manipulate data managed by API server
Uses HTTP for transport(using get and post) method
netconf and ssh not necessary
GUI app explorer

JET API:
=======
Enables 3rd party apps to run on junos
program junos control plane
uses GRPC instead of netconf
uses JSD process
faster commit times and improve device telemetry and wider range of possible languages available for automation
Uses below:
   GRPC for cross language services to enabled request response service
   for event notification uses MQTT(Message Queue Telemetry Transport) Protocol. Implementted using Mosquitto notification broker.
   Uses Ephemeral DB for fast programming config features. Validates syntax but not semantics. User has to be careful while using epheremal DB
   
   
JSNAPY:
======
Take snapshots and compare snapshots



NETCONF:
=======

Messages layer:

* RPC 
* RPC-REPLY
* Notification: One way message 

No comments:

Post a Comment