Skip to Content
Automating Junos Administration
book

Automating Junos Administration

by Jonathan Looney, Stacy Smith
April 2016
Intermediate to advanced
684 pages
17h 34m
English
O'Reilly Media, Inc.
Content preview from Automating Junos Administration

Chapter 2. RPC Mechanisms

The building block of Junos management automation is the remote procedure call (RPC). Just as the drivers of the CLI are the commands a user enters, the drivers of Junos management automation are RPCs.

RPCs are equivalent to commands in many ways, but there are some differences. The main difference is that RPCs take structured input. (They also return structured output by default; however, that is orthogonal to the input format, as both the CLI and some automation mechanisms can return various output formats.) A secondary difference is that MGD assumes that CLI commands are being run from the cli process on the router, while it makes no such assumption with RPCs. While the CLI commands and RPCs often access the same code, there are times when they follow slightly different code paths. One example of slightly different code paths is discussed in “The file Commands: The Exceptions That Prove the Rule”.

For automation purposes, it is helpful to be able to use structured data for both input and output. Using structured data allows the automation script and the Junos software to clearly communicate information to each other. The next section begins by talking about the structured data model, then applies the structured data model to RPC input and output.

Structured Data Model

Structured data has many benefits for the purposes of automation. I remember writing automation scripts years ago that used the Expect language. These scripts sent input to a router and expected ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Network Programmability and Automation

Network Programmability and Automation

Jason Edelman, Scott S. Lowe, Matt Oswalt
Network Programmability and Automation Fundamentals

Network Programmability and Automation Fundamentals

Khaled Abuelenain, Jeff Doyle, Anton Karneliuk, Vinit Jain
CCNP Enterprise Advanced Routing ENARSI 300-410 Official Cert Guide

CCNP Enterprise Advanced Routing ENARSI 300-410 Official Cert Guide

Raymond Lacoste, Ramiro Garza Rios, Bradley Edgeworth, Jasos Gooley

Publisher Resources

ISBN: 9781491928875Errata Page