O'Reilly logo

JUNOS Automation Cookbook by Adam Chappell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How it works...

Step 1 simply declares the XML namespace definitions. Each ns line associates a prefix tag with a fully-qualified XML namespace identifier. XML namespace identifiers look exactly like URLs. They are not URLs, they are simply unique strings, but the implied organizational hierarchy is similar to that of a URL.

In step 2, we make a call to one of the internal JUNOS functions which invokes an XML RPC. In this case, the RPC that we call is get-interface-information. We store the result in a variable for analysis.

In step 3, we use an unnamed match term. Remember that SLAX and XSLT effectively translate an XML document and by simply matching /, we're effectively saying that we don't care about the input document. In the case of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required