07-20-2022 03:19 AM
Is there any way of deleting the topology data, especially variables? Can this be done through a yml file or anyway of deleting it using the yang file? I am running NSO via docker on my local environment to try and find a solution to this issue.
07-20-2022 07:49 AM
What are you referring to when you say topology data?
07-21-2022 12:14 AM - edited 07-21-2022 01:08 AM
How do I delete these variables via a script?
07-21-2022 12:55 AM
I see.
First, get familiar with: Basic Automation with Python - NSO Guides - Document - Cisco DevNet
If you have access to NSO included PDF docs, there is one called 'nso_development'. That one has better explanation into MAAPI and MAAGIC (stuff that you want to learn about when scripting towards NSO). The section for you is called "Python API Overview"
Then, you will need to learn how to read the data hierarchy. Easiest way to do it is in CLI: show running-configuration global | display xpath
Bunch of xpath lines will show up. Random example:
/devices/device[name='rfs']/config/ncs:java-vm/jmx
You will need to learn how to translate that into MAAPI/MAAGIC. General rule of thumb is this:
So, above becomes:
root.devices.device['rfs'].config.ncs__java_vm.jmx
P.S. Regarding posting in future. Form questions in a way random people without insight can answer. Also, avoid posting pictures of data like IPs and those server keys. Thought that that might actually be real data of some production makes my right eye twitch.
07-25-2022 07:43 PM
Hi,
I wanted to know which python package to install, to import ncs.
Rightn now I get
ModuleNotFoundError: No module named 'ncs'
this error
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