Deal with aliases
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.
so does this mean, that instead of using the uniq ID i can reference with any of the 'local_addresses'?
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?
"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"?
It's the current situation (how it is now).
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.
@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).
I also think referencing only IDs is the way to go. Thanks a lot for your work!