Blog Viewer

How can I remotely access a Junos OS device with Junos PyEZ?

By Erdem posted 08-06-2015 10:53

  

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 password (the default is using ssh-keys). You then open a connection to the device, perform automation activities on it, and finally close the connection.

 

Each managed Junos OS instance maintains a collection of "facts". These facts are loaded when you open a connection to the device. Facts are generally static pieces of information, such as the software version or serial number. These facts form the basis for other modules when creating abstractions. For example, configuring VLANs on one Junos OS product family might actually be different from another at the XML API level. The purpose of Junos PyEZ is to abstract those differences so the user has a consistent automation interface.

 

Read the document Device Connectivity in Junos PyEZ


#How-To
#junospyez
#Python
#yaml

Permalink