cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
564
Views
5
Helpful
4
Replies

Delete topology data from NSO

jacobcf
Cisco Employee
Cisco Employee

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.

4 Replies 4

u.avsec
Spotlight
Spotlight

What are you referring to when you say topology data?

How do I delete these variables via a script?

u.avsec
Spotlight
Spotlight

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:

  • / becomes .
  • - becomes _
  • : becomes __
  • you don't have to include key node names

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.

Hi,

I wanted to know which python package to install, to import ncs.

Rightn now I get

ModuleNotFoundError: No module named 'ncs'

this error