cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1417
Views
0
Helpful
3
Replies

adding a node to a nodeset

a.alhamali931
Level 1
Level 1

Hello all,

I have a nodeSet that was already created and now I want to add new nodes to it.

I'm doing this when the nodeset is expanded. My code goes as follows:

topo.on('beforeExpandNodeSet', (sender, nodeSet) => {

        var lanInfo = this._topologyClient.getLANInfo(nodeSet.model().getData().id);     //Fetch the information of the nodes

        for (var i: number = 0; i < lanInfo.length; i++) {

          var node = topo.addNode(lanInfo[i], undefined, nodeSet);

         }

})

This doesn't seem to do it. In fact, if I go through the code of the function addNode, I find out that it doesn't have a third parameter (parentNodeSet), even though it says it does, in the documentation.

How can I add this newly-created nodes to the nodeset?

Thank you

1 Accepted Solution

Accepted Solutions

aaikepae
Cisco Employee
Cisco Employee
3 Replies 3

aaikepae
Cisco Employee
Cisco Employee

Refer this : Adding new NodeSet

Abu

Thank you Abu

Any idea when this will be added to the formal API?

Thank you

Hi AbdulRahman AlHamali,

I already add to current develop trunk. Will release that in 3 months.

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: