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