netdiff icon indicating copy to clipboard operation
netdiff copied to clipboard

Deal with aliases

Open nemesifier opened this issue 10 years ago • 7 comments

A node might be referenced one time with an id and another time with one of its aliases.

In such a case netdiff would consider the topology changed.

The local_addresses attribute was recently introduced in NetJSON NetworkGraph (see https://github.com/interop-dev/netjson/issues/15), we can use this feature to work it consistently on all the parsers of the protocols that use aliases.

nemesifier avatar Sep 26 '15 22:09 nemesifier

so does this mean, that instead of using the uniq ID i can reference with any of the 'local_addresses'?

bittorf avatar Sep 27 '15 07:09 bittorf

Hello @bittorf, I don't understand very well your question because netdiff itself does not provide a way to reference nodes, maybe that's possible with its dependency, networkx?

Netdiff does mainly two things: parse network topology data files and compare two topologies to understand what has changed. The current issue is that when comparing two topologies, if the same node is referenced with different IDs netdiff will consider this a change in the topology and we don't like it. Was this clear?

What is your question about? Is there something you would like to do which now you can't?

nemesifier avatar Sep 27 '15 14:09 nemesifier

"A node might be referenced one time with an id and another time with one of its aliases. In such a case netdiff would consider the topology changed."

Is this "how it is now" or "how it should be"?

bittorf avatar Sep 27 '15 17:09 bittorf

It's the current situation (how it is now).

nemesifier avatar Sep 27 '15 18:09 nemesifier

in current master (0.4.5 alpha), we already have the local_addresses key of the netjson output filled up, although the issue is not ultimately solved.

nemesifier avatar Sep 27 '15 22:09 nemesifier

@bittorf, in retrospective I think I misunderstood your question back in those days. Now me and @gabriel we believe we should update the NetJSON spec to force referencing nodes only with their IDs and not their aliases, in order to simplify consumer implementations (it's more efficient to let producers handle the mapping as they know better than consumers).

nemesifier avatar Dec 27 '17 11:12 nemesifier

I also think referencing only IDs is the way to go. Thanks a lot for your work!

bittorf avatar Jan 02 '18 19:01 bittorf