Re: routing tables to dia network map



On Sun, 7 Mar 2004, W. Borgert wrote:

On Sun, Mar 07, 2004 at 07:59:43PM +0100, Philippe Biondi wrote:
- Dia or other tool ?

Well, my personal preference would be dia.  Question: Do you
intend to create diagrammes that you want to edit manually
(e.g. to refine things) or is your goal a 100% complete
automatic solution (e.g. to present things in the web
without any intervention)?  If you go for (1), use dia, if
you want to have (2), dia does not help so much.  OK, you
can automatically create PNG from dia files...

I go for 1.

- Dia python plugin / simple XML generator / no parser at all / other ?

I think, a stand-alone Python programme would be the best
solution, using either the standard Python XML library or
the libxml2 module for Python.  There is no much gain in
having it a Dia plugin, right?

I don't know, that's why I ask the question. The best approach for me,
would be to be able to import some dia module that will handle all the
xml stuff for me. My dream would be sth that looks like :

import dia

mygraph = dia.A_new_graph()

router1 = dia.A_new_icon("Cisco router")
router2 = dia.A_new_icon("Cisco router")
net1 = dia.A_new_icon("Cloud")
dia.mygraph.add(router1,(0,0))
dia.mygraph.add(net1,(20,0))
dia.mygraph.add(router1,(40,0))
dia.mygraph.connect(router1, net1)
dia.mygraph.connect(router2, net1)
dia.mygraph.writefile("mymap.dia")

and get this diagram :

 [Cisco icon]--[cloud icon]--[Cisco icon]


Does this exists ?
I know there is a dia module, but it is not installed in the python library.
I imagine it is only for the python plugin. Is it ok to use it in external
programs ? And how to use it ?

If I have to go and handle the xlm myself, is there anything already done
to share between such programs or any program has to do it by itself ?



-- 
Philippe Biondi <phil@ secdev.org>      SecDev.org
Security Consultant/R&D                 http://www.secdev.org
PGP KeyID:3D9A43E2  FingerPrint:C40A772533730E39330DC0985EE8FF5F3D9A43E2





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]