How to generate an automatic diagram?

Hello,

3 years ago, I did a python script that was able to generate what we can see below. In the middle are the network equipment and on the exterior are the servers that are connected to them with the network interfaces. The thing is that I lost the script and I need to reproduce a similar graphic.

Sadly, I have no memory left of what I have done and I started to see how it worked again. My problem is that all the values from nodes and edges that I saw from example are written manually. I had in mind to have the network equipment written manually and the servers (which can be counted in several tens) stored in files. Is it possible to do so by reading the server files into the python script, store them into a variable like a list or a dictionary, and generates as much as nodes and edges as needed (1 server = 1 node) ? If it is, then how ?

[It is SO annoying to create a “one time” program/document/product and then find that you need to do it again but have completely forgotten how you did it the first time! Ouch!]
There is no singular way to recreate the above diagram, but here is a simple architecture that may work for you.

  • One input file, each record representing one edge/circuit/link. For example:
    • networkEqpt1|server1|infoForEdgeLabel
    • networkEqpt1|server2|infoForEdgeLabel
    • networkEqpt2|networkEqpt1|infoForEdgeLabel
    • networkEqpt3|server2|infoForEdgeLabel
  • A program that:
    • reads the input
    • parses each line to separate “tail” node from “head” node
    • creates a new edge with “tail” and “head”
    • assigns a color to the new edge, based on “tail” name
    • assigns the “infoForEdgeLabel” to the edge “arrowhead” attribute
    • runs the result through the “twopi” layout engine (Twopi Radial Graphs | Graphviz)

twopi should then take care of the layout

Take a look at Excel to Graphviz.
If you can bring your data into a csv format in excel, you know a bit of sql you can create these diagrams from your data set in no time using the SQL features of this tool that create the dot file for you.