Automation

 View Only
last person joined: 6 days ago 

Ask questions and share experiences about Apstra, Paragon, and all things network automation.
  • 1.  off-box python load configuration error

    Posted 09-25-2021 05:20
    I ran the following in python 3.9.4, it works.
                httpcmd = 'http://10.146.40.242/junosConfig/testConfig'
                cu.load(url=httpcmd,format='set')
                cu.pdiff()
                cu.commit(timeout=360)
    ​

    But I ran the following in python3.6 with junos-eznc-2.6.2, I got the following errors:

    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/site-packages/jnpr/junos/device.py", line 837, in execute
        filter_xml=kvargs.get("filter_xml"),
      File "/usr/local/lib/python3.6/site-packages/jnpr/junos/decorators.py", line 165, in wrapper
        raise ex
      File "/usr/local/lib/python3.6/site-packages/jnpr/junos/decorators.py", line 117, in wrapper
        rsp = function(self, *args, **kwargs)
      File "/usr/local/lib/python3.6/site-packages/jnpr/junos/device.py", line 1440, in _rpc_reply
        return self._conn.rpc(rpc_cmd_e, filter_xml)._NCElement__doc
      File "/usr/local/lib/python3.6/site-packages/ncclient/manager.py", line 231, in execute
        huge_tree=self._huge_tree).request(*args, **kwds)
      File "/usr/local/lib/python3.6/site-packages/ncclient/operations/third_party/juniper/rpc.py", line 52, in request
        return self._request(rpc)
      File "/usr/local/lib/python3.6/site-packages/ncclient/operations/rpc.py", line 360, in _request
        raise self._reply.error
    ncclient.operations.rpc.RPCError:
    shared configuration database modified
    

    any insights ?

    thanks !!



  • 2.  RE: off-box python load configuration error

    Posted 09-26-2021 05:57
    with Config(dev, mode='private') as cu:
    After I took off mode='private', it works.

    I am not sure whether it is related to the junos-eznc version.