The _netjson_networkgraph function is used to generate a NetJSON NetworkGraph.
https://github.com/openwisp/netdiff/blob/master/netdiff/utils.py#L127
Right now it is more like an internal function. It would be nice providing it to the module users so that they don't have to reinvent the wheel so much.
For example, in openwisp-network-topology, the json method of the Topology model is already reinventing it:
https://github.com/openwisp/openwisp-network-topology/blob/fac83331cee7194aef4ba92f0a5fa067d3597aac/openwisp_network_topology/base/topology.py#L139-L169
The _netjson_networkgraph function is used to generate a NetJSON NetworkGraph.
https://github.com/openwisp/netdiff/blob/master/netdiff/utils.py#L127
Right now it is more like an internal function. It would be nice providing it to the module users so that they don't have to reinvent the wheel so much.
For example, in openwisp-network-topology, the
jsonmethod of theTopologymodel is already reinventing it:https://github.com/openwisp/openwisp-network-topology/blob/fac83331cee7194aef4ba92f0a5fa067d3597aac/openwisp_network_topology/base/topology.py#L139-L169