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…

Steps 1 through 4 are common to most of the previous recipes that we’ve covered in this chapter, so I won’t linger on them. Step 5 is where the action starts. We define a new table and view using the YAML format language in order to describe the relationships between objects and encapsulate it within a Python triple-quoted string.

In the BGP table that we define, we replicate some of the original BGP table and view, but we also make some changes:

  • The RPC is changed to get-bgp-summary-information. It’s a slightly lighter call, with less information, but it’s all we need.
  • The table key is changed to be that of a peer-address, on the understanding that it is much more likely to be a unique parameter. It’s not impossible that we ...

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