Juniper / py-junos-netconify

Junos console/bootstrap automation Python module
Apache License 2.0
67 stars 30 forks source link

pypi junos-netconify package needs updating #57

Closed networkfoo closed 7 years ago

networkfoo commented 7 years ago

The package for py-junos-netconify at https://pypi.python.org/pypi/junos-netconify/1.0.2 has the following code (specifically line 22) in facts.py:

        # extract the version
        # First try the  tag present in >= 15.1
        swinfo = rsp.xpath('.//junos-version')[0].text
        if not swinfo:
            # For < 15.1, get version from the "junos" package.
            pkginfo = rsp.xpath(

and when run this gives me an error:

fatal: [hostname]: FAILED! => {"changed": false, "failed": true, "msg": "list index out of range"}

I have changed my local 'python2.7/site-packages/netconify/facts.py' file to represent the current code at line 22 and this now functions correctly for me.

        # extract the version
        # First try the  tag present in >= 15.1
        swinfo = rsp.findtext('junos-version', default=None)
        if not swinfo:
            # For < 15.1, get version from the "junos" package.
            pkginfo = rsp.xpath(

kind regards,

vnitinv commented 7 years ago

Hi, netconify has been merged in PyEZ. For telnet and console connection please use PyEZ from now onwards. refer https://github.com/Juniper/py-junos-eznc/releases/tag/2.0.0