Automation

IMPORTANT MODERATION NOTICE

This community is currently under full moderation, meaning  all posts will be reviewed before appearing in the community. Please expect a brief delay—there is no need to post multiple times. If your post is rejected, you'll receive an email outlining the reason(s). We've implemented full moderation to control spam. Thank you for your patience and participation.



Expand all | Collapse all

off-box python load configuration error

  • 1.  off-box python load configuration error

    Posted 22 days ago
    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 21 days ago
    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.