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 >>>
Do you have a hard time staying updated on what's going on due to the massive flow of information?
I recommend that you manage your subscription and notification settings by clicking on your avatar up on the right corner.
Select "My subscriptions" ...
The NSO community is constantly growing. The number of unique visitors on the Developer Hub has been increasing steadily since the beginning and the trend continues. Network Automation is, as we could read in Cisco’s inaugural N...
We're excited to announce our third annual Cisco NSO Developer Days NYC!
Returning to New York City, the two-day event is a tremendous opportunity to learn more about real-world applications of automation, gain a better understanding of NSO technol...
Want to run both python2 and python3 packages at the same time? Maybe you don't want to upgrade all your python2 services at the same time? With some small changes to the "ncs-python-start-vm" script you can. While you are at it maybe you would like...