How to do it…

We’ll identify the variables, build a Jinja2 template, then create a PyEZ application to take the input parameters from the user and deploy them to the router:

  1. Determine the variable components of our configuration task. They are summarized in the following list:
    • Physical interface
    • Logical unit identifier
    • VLAN identifier
    • Local interface IP address
    • VRF identifier
    • Route distinguisher (for MPLS VPN configuration)
    • Route target community (for MPLS VPN configuration)
    • Customer site router IP address
    • Customer-located networks
  2. Reduce the variable components of the configuration into the most minimalist form by using derivations: deriving one value in the configuration from another input parameter. This brings simplicity through minimizing ...

Get JUNOS Automation Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.