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

There's more

The most useful aspect of the event response op script above is the ability to bind attributes from events to arguments within an op script in order to take action. In the recipe, we used this behavior to communicate the name of the interface to the op script. However, there is an alternative method to using this channel of communication.

JUNOS also recognizes the notion of an event script, which is a SLAX script that directly consumes the XML content associated with an event and can act on the increased richness of information.

So instead of mapping attributes to arguments, we can write an event script that uses XPath expressions on an input document in order to analyze in detail the intricacies of events that occur on the JUNOS ...

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