test and troubleshooting netconf to vMX


1- ping 192.168.99.11

2-  ssh ansible@192.168.99.11

3- netconf:    ssh root@192.168.99.11 -p 830 -s netconf     ( root because latter on ansible will use root )

4- 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='172.30.95.177',user='Netbox',passwd='Netbox')
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()

python facts.py
/project # python facts.py
#print everything

{'2RE': False,
 'HOME': '/var/home/ansible',
 'RE0': None,
 'RE1': None,
 'RE_hw_mi': None,
 'current_re': ['re0'],
 'domain': None,
 'fqdn': 'vMX1',
 'hostname': 'vMX1',
 'hostname_info': {'re0': 'vMX1'},
 'ifd_style': 'CLASSIC',
 'junos_info': {'re0': {'object': junos.version_info(major=(12, 1), type=R, minor=1, build=9),
                        'text': '12.1R1.9'}},
 'master': None,
 'model': 'OLIVE',
 'model_info': {'re0': 'OLIVE'},
 'personality': 'OLIVE',
 're_info': None,
 're_master': None,
 'serialnumber': None,
 'srx_cluster': None,
 'srx_cluster_id': None,
 'srx_cluster_redundancy_group': None,
 'switch_style': 'NONE',
 'vc_capable': False,
 'vc_fabric': None,
 'vc_master': None,
 'vc_mode': None,
 'version': '12.1R1.9',
 'version_RE0': '12.1R1.9',
 'version_RE1': None,
 'version_info': junos.version_info(major=(12, 1), type=R, minor=1, build=9),
 'virtual': True}