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

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