NSO Maagic API add cmd 'ip http active-session-modules none'
I'm creating an automation to do automated healing of network device misconfigs. One fix would be for an audit to be able to add back 'ip http active-session-modules none'. I found one article that talked about using the .create() method but I end up with:
>>> with ncs.maapi.single_write_trans('XXXXX', 'python', groups=['XXXXXXXX']) as trans: ... root = ncs.maagic.get_root(t) ... device_cdb = root.devices.device["XXXXXXXXX"] ... device_cdb.config.ios__ip.http.active_session_modules.none.create() ... trans.apply() ... Traceback (most recent call last): File "<stdin>", line 4, in <module> File "/apps/nso/opt/ncs/current/src/ncs/pyapi/ncs/maagic.py", line 1017, in create if not self._backend.exists(self._path): File "/apps/nso/opt/ncs/current/src/ncs/pyapi/ncs/maapi.py", line 1175, in proxy return real(self2.maapi, self2.th, *args, **kwargs) File "/apps/nso/opt/ncs/current/src/ncs/pyapi/ncs/maapi.py", line 404, in exists return True if _tm.maapi.exists(self.msock, th, path) else False File "/usr/lib64/python2.7/socket.py", line 224, in meth return getattr(self._sock,name)(*args) File "/usr/lib64/python2.7/socket.py", line 170, in _dummy raise error(EBADF, 'Bad file descriptor') socket.error: [Errno 9] Bad file descriptor >>>
Unable to write xml file in NSO 5.3 CDB using maapi.load_config with below command"maapi.load_config(m['s'],m['th'], maapi.CONFIG_XML, "Test.xml")"
Creating the transaction object as, th = _ncs.maapi.start_trans(s, _ncs.RUNNING ,_ncs.READ_WRITE)
NSO as the sample implementation of new technology
Cisco NSO is a product implimenting RFC 6020 (yang) faithfully, and we could use it for testing new in the automation technology before even going on implementing ourselves. The author of the RFC is ...
I got this error when I try to sync-from from one of my device:
anthony@ncs# devices device mv-lab sync-from
info External error in the NED implementation for device mv-lab: read timeout after 20 seconds, blocked on "\r\n" w...
For many of us, it is time to celebrate Christmas, Hanukkah, Kwanzaa, the Winter Solstice, or just the New Year. Regardless, if you celebrate any of these festivities it means time off and we get some extra time to spend with family and friends while we r...
Here is a summary of the Developer Days content with quick links
NSO State of the Union, Fredrik Lundberg, Dir. Strategy & Planning, NSO
Workflow vs NSO Service vs Nano Service, Viktor Leijon, Technical Leader, NSO
A Breakneck Journe...