Log in to ask questions, share your expertise, or stay connected to content you value. Don’t have a login? Learn how to become a member.
Define a Table View to Access Table Item Fields You generally define a Table View when you define the Table in operational or configuration mode. The purpose of a View is to map the Junos XML fields into native Python so the caller doesn't need to know XML (or Junos OS). For...
Overview Explains the use of loadyaml() to create new Table/View widgets. Discussion Tables and Views are generally defined using the YAML syntax, as described in other topic pages. YAML files are typically loaded as part of a Python module so that they can be natively...
Overview Explains using tables for automation tasks. Discussion Table widgets can be either loaded from a Python module or using the loadyaml() function provided by the jnpr.junos.factory module. For the purpose of this discussion to illustrate the use of tables, we...
1 Comment - no search term matches found in comments.
Make Template-based Configuration Changes You can make template-based configuration changes using Python. The jnpr.junos.utils.config module provides a Config.load() method that enables Jinja2- based template changes. You indicate the template file and a Python dictionary of variable...
2 Comments - no search term matches found in comments.
Overview You want to load locally stored XML files into Table widgets for post-processing. Solution The Table widget provides a path constructor parameter that loads the XML from a locally stored data file, rather from a remote Device. For example, using the...
Handle Python Exceptions You can handle Python exceptions when things go wrong. Specific exception names are imported as shown: from jnpr.junos.exception import * The following exceptions are defined: RpcError - general RPC error CommitError - resulting for...
Connect to Devices Remotely Each managed Junos OS device is modeled as a jnpr.junos.Device variable (aka "instance"). The general process is you create a variable for each device, providing at least the hostname. You can optionally provide a username (the default is $USER ) and a...
Junos PyEZ Features and Architecture Junos PyEZ is a Python "micro-framework" used to remotely manage or automate Junos OS devices. The user is NOT required to be a software programmer, have sophisticated knowledge of Junos OS, or have a complex understanding of the Junos OS XML...
Access RPC On Demand Directly You should always have the ability to do anything that the Junos OS or XML API provide. Each Device variable has an rpc property to make accessing Junos OS at this low level easy. Junos PyEZ has metaprogramming to do what you want only when you need it ...
9 Comments - no search term matches found in comments.