sk2 / ank_legacy_v2

Legacy edition of autonetkit. Please see https://github.com/sk2/autonetkit for latest version
www.autonetkit.org
BSD 3-Clause "New" or "Revised" License
10 stars 4 forks source link

Feature Request: Export diagram into the fileset #230

Open ntwrkguru opened 12 years ago

ntwrkguru commented 12 years ago

Not sure how yEd does this internally, but the automatic generation of the JPG/PNG into the root of the tarball would be very helpful.

sk2 commented 12 years ago

Which PNG/JPG? At the moment I only generate the javascript output, as this only requires ANK to write a text file.

I do have support for Matplotlib to render the graph to image formats (PNG, JPG, PDF, etc), but it requires Matplotlib to be installed: http://matplotlib.sourceforge.net/

I've tried to keep the dependencies to a bare minimum for AutoNetkit. I can add in support to save the output, but I'm hesitant to require lots of external packages for graph drawing.

ntwrkguru commented 12 years ago

No, I agree with regards to the external dependencies. I'm wondering if yEd can be invoked from CLI to do this as it's an option within the yEd application? I'm guessing not, since it's a JAR. I actually forgot about the new plot feature when I posted this; I think that will work fine. How difficult is it to copy the plots to the tarball?

And certainly don't let my ideas creep too far off base... :-)

sk2 commented 12 years ago

Sure. Yeah I'd like to have an internal Python drawing tool, but not too keen on writing a GUI or graphics. I think that Matplotlib (if people want to install it) or the Javascript-based Arbor are good-enough solutions for now.

I think it's a good idea to save the topologies into the tarball, for reference. Would you like all of the plots or just some? I'd rather keep them to a minimum than blow out the tarball with heaps of files.

Is there a folder where I can put them inside the tarball that won't interfere with the Junos VMM format?

Also if you have any requests for more info on the plots, or the summary html page, please add a github issue.

ntwrkguru commented 12 years ago

Actually, as long as the topology.vmm is in the root of the tarball and any referenced configs are in the configset directory (and even that's flexible), it doesn't matter what else is there. I routinely add JPG and README text files in the root of the tarball and have no issues with loading or starting the topology. In my situation, I'm trying to keep everything in one place. So instead of a user (with no existing knowledge of the topology) having to go to an external site to view the diagram, they can download it directly from within the Junosphere UI. With that said, the only diagram actually needed (again, for my purposes) would be the "physical" layout. Nodes, links, etc.

Also if you have any requests for more info on the plots, or the summary html page, please add a github issue.

LOL. I haven't opened enough issues for now?? :-)