Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »


1- ping 192.168.99.11

2- netconf:    ssh ansible@192.168.99.11 -p 830 netconf

3- PyEZ:   python facts.py


facts.py
/project # more facts.py
import sys
from pprint import pprint
from jnpr.junos import Device
from jnpr.junos.exception import ConnectError

dev = Device(host='192.168.99.11',user='ansible',passwd='ansible123')
try:
    dev.open()
except ConnectError as err:
    print ("Cannot connect to device: {0}".format(err))
    sys.exit(1)

print("#print everything\n")
pprint (dev.facts)

dev.close()

  • No labels