[Interop-dev] [BMXd] make metric a optional property of NetworkRoutes, NetworkGraph, and each Route object

nemesis (spam-protected)
Sat Apr 9 12:38:03 CEST 2016


 On Tue, 5 Apr 2016 12:43:55 +0200, Henning Rogge <(spam-protected)> 
 wrote:
> On Tue, Apr 5, 2016 at 12:38 PM, Mitar <(spam-protected)> wrote:
>> I think this is a question of should the producer of JSON be smart 
>> and
>> do something more complicated, or should the consumer be smart. I 
>> think
>> in this case producer should not be smart and make it so that it is
>> simple to generate the file. We can always provide libraries to 
>> parse
>> JSON files in some easier way, if it there are common tasks for
>> consumers to do (like showing all links from a node no matter the
>> routing protocol).
>
> Some time ago I added a possibility for the Olsrd2 producers to get
> only a single "route/graph" object... and to get a list of all
> "metrics" so you can enumerate the "route/graph" objects.
>
> So we can do both, provide the full output for smart consumers and
> provide filtered output for stupid ones.
>
> Still I don't think adding more "metric variants" to the same
> route/graph object is a good approach, it doesn't add any capability
> AND it is increasing the complexity of NetJSON (because we can do the
> same things suddenly in multiple ways).

 Yes, I asked henning to implement a way to do this, because 
 django-netjsongraph [1], a collector/visualizer implementation
 of NetworkGraph I am currently testing and improving [2], is not able 
 to parse NetworkCollection yet.

 So on the nodes we just do:

 echo "/netjsoninfo filter graph ipv4_0" | nc 127.0.0.1 2009

 to get a specific graph.

 [1]: https://github.com/interop-dev/django-netjsongraph
 [2]: http://ninux-graph.netjson.org/



More information about the Interop-dev mailing list