cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
991
Views
0
Helpful
1
Replies

searching for nodes

m.rainer
Level 1
Level 1

Hi,

I would like to search for nodes (by name or other parameters) in my topology.

After finding I would like to "select" them.

So I have to iterate over all nodes.

This already works fine for all nodes shown in the current view. (found many different ways to do so p.e.:

topology.eachNode()

or

topology.graph().eachVertex()

and so on.

BUT:

As soon as a node is "hidden" behind a nodeSet this does not work.

So I am looking for a method to find all Nodes in my topology also those being hidden behind nodeSets.

topology.getData() does not help, as I can not select them there...

AND:
If I was able to find currently hidden nodes, and I select them, is there a way to select all nodeSet(s) that are parents of this node?

Again: Node is nested under NodeSets. If searched for that node I would like to "select" all the tree to the searched Node.

Ist this possible?

Thx a lot

Markus

1 Reply 1

aaikepae
Cisco Employee
Cisco Employee

Hi Markus,

there are couple steps you can fellow:

1. find vertex :  vertex = topo.graph().getVertex(ID)

2. check if vertex generated : vertex = generated()

3. if yes, just use topo.getNode(ID)

4. if not use this property find generated parent nodeset : var vs = vertex.generatedRootVertexSet(),

5 use topo.getNode(vs.id()) find parent nodeSet

Abu

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: