12-19-2016 03:18 AM
Hi,
I am new to NEXT, and try to model IGP for BGP-LS application. My initial model is;
{:router}-[:CONTAINS]->(:interface)-[:CONNECTED]->(:interface)<-[:CONTAINS]<-{:router}
as seen i defined the link as unidirectional, and different node types for router and interface.
I wander how its defined in Next-UI topology model, especially for the interface is there any documentation how to model router with interfaces? do they defined as node or labels on links, like source/destination interface?
Solved! Go to Solution.
01-09-2017 04:23 AM
Hi Deniz,
Christmas and New Year holidays are so long! I hope you've had a nice time
The CTM model implies each network component to be described as a JavaScript object. In your case you may want to specify the list of available interfaces for each node inside the node object, since there's no strict way to do so in NeXt.
{
id: 0,
name: "Router1",
type: "router",
interfaces: [
"int1", "int2", "int3"
]
}
Thus, the link object should contain specific information about the connected interfaces
{
id: 0,
source: 0,
target: 1,
sourceInterface: "int2",
targetInterface: "int100"
}
Like I said, "interfaces" is not something that is built in NeXt. However, you can add your own attributes into the topology data object (like I did above) and go on to process the information as you need.
12-19-2016 10:48 AM
Hi Deniz,
Thanks for reaching out. I will prepare a detailed reply for you tomorrow.
I would also recommend you to get to know our tutorial: Understand Common Topology Model
12-20-2016 12:04 AM
Hi Aleksei,
Thanks for your reply. I am waiting for your answer. I also begin the tutorial section and try to use next ui over our model.
01-09-2017 04:23 AM
Hi Deniz,
Christmas and New Year holidays are so long! I hope you've had a nice time
The CTM model implies each network component to be described as a JavaScript object. In your case you may want to specify the list of available interfaces for each node inside the node object, since there's no strict way to do so in NeXt.
{
id: 0,
name: "Router1",
type: "router",
interfaces: [
"int1", "int2", "int3"
]
}
Thus, the link object should contain specific information about the connected interfaces
{
id: 0,
source: 0,
target: 1,
sourceInterface: "int2",
targetInterface: "int100"
}
Like I said, "interfaces" is not something that is built in NeXt. However, you can add your own attributes into the topology data object (like I did above) and go on to process the information as you need.
01-09-2017 04:37 AM
By the way, that might be useful for you if you need to depict interface on the topology: http://codepen.io/NEXTSUPPORT/full/LNgYER/
To see the code: http://codepen.io/NEXTSUPPORT/pen/LNgYER
01-10-2017 02:29 AM
Hi Aleksei,
Thanks for your reply and also hapy new new year. I saw same examples as you mentioned in page nextsupport's Fiddles - JSFiddle - Online JavaScript Editor - jQuery, Angular, Backbone, Underscore, Knockout, YUI . I just begin the demos and using NEXT UI.
Also I am trying build network monitor application. I can change the node icon accourding to node's attribute (status:down/up) if its up I am using green router icon, if its down I am using the red one. Tring to apple same logic to nodeset. If one of the node's in the nodesset is down (status:down) change the nodeset icon type to red one. Currently i am digging to find it in the examples but it would be great if you can help on this subject.
Again thanks for your answer.
01-10-2017 07:34 AM
Hi Deniz,
I created a snippet for you: http://codepen.io/NEXTSUPPORT/pen/WRrxWM
That should be of help.
01-10-2017 08:18 AM
Hi Aleksei,
It looks fine but a little bir different than what I want. This requires additional function while construting topology data ( I am using graph database, neo4j and importing its data to next ui).
I am looking for a different approach. Let me explain over the data ;
nodes: [{
"id": 0,
"x": 410,
"y": 100,
"name": "12K-1",
"status":"down"
}, {
"id": 1,
"x": 410,
"y": 280,
"name": "12K-2"
"status":"up"
}
and the nodes is without nodeset
nodeSet: [
{
id: 1001,
nodes: [0,1],
name: "Group 1",
x: 100,
y: 50
},
for the nodeset config"
nodeSetConfig: {
color: function(model){
// iterate over node's status and if one of then is down set colour red and exit.
},
This will be very useful in one the routers is down, it nodeset (city,pop or etc) will be red and alerted.
I may use your method while constructing the data from the database but i am trying to understand if its possible to iterate over the node's of the nodeset for this type of function.
Thanks a lot for your quick reply.
01-10-2017 08:59 AM
Deniz,
That is possible. I will need time to prepare the new example for you.
03-29-2017 01:36 AM
Hi Aleksei,
is it possible to change linkSet attribute like color based on members links. I am tring to change linkSet color if one of the member status shows down.
03-30-2017 05:29 AM
I finally made it.
08-28-2019 08:37 AM
Thanks,
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