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...

The param directive declares a parameter to the op script called description, and in our case, it sets a default value of .*—a regular expression which will match everything. The arguments structure simply provides an XML response that helps the JUNOS mgd daemon structure an interactive CLI help page for the command-line argument.

This time the XPath predicate calls jcs:regex() to determine whether a given logical interface should be processed or not. jcs:regex() performs a regular expression evaluation upon the description of the interface. Regular expressions are powerful expressions used to match text values and have useful application in text search and validation. The following table gives a brief primer into regular ...

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