Quick Start
Prerequisites
Python Knowledge
You will need a bit of Python programming knowledge to use this library. If you are stuck or encounter a problem, r/learnpython is a good resource for learning.
Juniper Knowledge
The Juniper instance heavily utilizes the Juniper PyEz Python Library so it is important to get yourself familiar with some of its features.
Obtaining A Juniper Instance
To create a Juniper instance, you need:
host name
host addresss
username
password
After obtaining this information, we can instantiate a Juniper instance to directly use its methods. For example:
from netopsauto.juniper import Juniper
from pprint import pprint
switch = Juniper("host_name", "host_address", "user", "password")
# We can optionally call initialize_device() to directly utilize the PyEZ Device instance
dev = switch.initialize_device()
dev.open()
pprint(dev.facts)
dev.close()
# prints detailed Juniper device information
# https://www.juniper.net/documentation/en_US/junos-pyez/topics/task/program/junos-pyez-program-device-connecting.html