06-18-2021 11:08 AM
Hello All,
I'm wondering if anyone was able to log directly to NSO service using Python API ncs.service_log https://developer.cisco.com/docs/nso/api/#!ncs-service_log
It might be missing a bit of a description. I'm not clear if path is path to service or to service/log. As well as type variable is missing a description.
My code example:
The last line gives me error:
File "/home/dev/.local/lib/python3.8/site-packages/ncs/maapi.py", line 711, in write_service_log_entry
_tm.maapi.write_service_log_entry(self.msock, path, msg, type, level)
TypeError: argument 3 must be confd.Value
Setup:
Ubuntu
NSO v5.5.2
Thank you !
Solved! Go to Solution.
07-02-2021 10:34 AM
Hello @Maksim12,
NSO is not my specialty, but I'd like to point out some resources for you, which will hopefully prove helpful:
Hope this helps!
08-10-2021 12:11 AM
The third parameter should be an instance of ncs.Value, so:
servicelog = ncs.service_log.ServiceLog(node)
servicelog.error("", "test", ncs.Value("ncs:service-modified", ncs.C_BUF))
07-02-2021 10:34 AM
Hello @Maksim12,
NSO is not my specialty, but I'd like to point out some resources for you, which will hopefully prove helpful:
Hope this helps!
08-10-2021 12:11 AM
The third parameter should be an instance of ncs.Value, so:
servicelog = ncs.service_log.ServiceLog(node)
servicelog.error("", "test", ncs.Value("ncs:service-modified", ncs.C_BUF))
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide