Following the python session given by Lindblad in Cisco NSO Developers Days, I thought it would be useful to share the integration between Pycharm and NSO and use the NCS python libraries right from your development machine. Another option of course is to utilize the ipython NSO package and develop from NSO itself but I think it's much more convenient to have one developing environment for all your code and in this case it will be Pycharm
Anyways, without more talking, Lets walk on the steps on how to do it
Note: You need to have a Pycharm Professional (not community) version in order to apply the below steps (basically the remote interpreter feature)
First, in Pycharm, Go to Tools | Deployment | Configuration
Second, provide Linux details that host NSO application
Third, Define new remote python interpreter from settings | Project:<name> | project interpreter
it will take few minutes to upload and download all helpers file needed to integrate pycharn with python, once finished you'll see all python modules installed in Linux machine appear in pycharm
Finally to make Pycharm auto-complete the libraries and read the NSO python modules, You need to define the environmental variables under interpreter setting
And That's it!. You can now develop your own service modules that use python using Pycharm integrated with NSO. For example pycharm will now autocomplete and provide suggestion when you import ncs package
We have written a java package with log4j as logging mechanism. The logs from the package are seen in java vm logs.
Our code uses a jar file which internally uses slf4j. We cant change this jar. However it is important that we log the lo...
Hi Team: if i call the partial_sync_from in the cb_create func, the paragram will stop at the executing. the code is :partial_func = root.ncs__devices.partial_sync_frominput = partial_func.get_input()input.path = ["/ncs:devices/ncs:device[n...
Is there a way to make NSO pick up changes made in the cb_create() method for a python service package without having to do a "packages reload"? A "python-vm stop name <<package-name>>" does not seem to trigger the changes being picked up.