Unable to connect to visualisation server

126 views
Skip to first unread message

Jason Edelman

unread,
Nov 3, 2014, 8:13:04 AM11/3/14
to auton...@googlegroups.com
Hi, I just downloaded autonetkit and trying to get a basic diagram created by using Python.

I've followed the code so far as documented below, but receive the error "INFO Unable to connect to visualisation server http://127.0.0.1:8000/publish" when trying to do
autonetkit.update_http(anm).  Can someone provide guidance?

And, I'm really not looking to display via http anyway, so is there a way NOT to push to http, but send directly to a file like png or jpeg?

Thanks in advance,
Jason


import autonetkit
anm = autonetkit.NetworkModel()
g_in = anm.add_overlay("input")
nodes = ['r1', 'r2', 'r3', 'r4', 'r5']

g_in.add_nodes_from(nodes)
g_in.update(device_type = "router", asn=1)
g_in.update("r5", asn = 2)
positions = {'r1': (10, 79),
 'r2': (226, 25),
 'r3': (172, 295),
 'r4': (334, 187),
 'r5': (496, 349)}

for n in g_in:
    n.x, n.y = positions[n]

autonetkit.update_http(anm)

Jason Edelman

unread,
Nov 3, 2014, 8:20:50 AM11/3/14
to auton...@googlegroups.com
To clarify, I have autonetkit AND autonetkit_vis installed.

Jason Edelman

unread,
Nov 3, 2014, 10:48:37 AM11/3/14
to auton...@googlegroups.com
Disregard...I have this working now.


On Monday, November 3, 2014 5:13:04 AM UTC-8, Jason Edelman wrote:

Simon Knight

unread,
Nov 3, 2014, 4:46:30 PM11/3/14
to auton...@googlegroups.com
Hi Jason,

If you install the visualization server

$ pip install autonetkit_vis
and then start it

$ ank_webserver --ank_vis

then it will auto pick up the topologies. You can safely ignore the
info message if you don't want to send to the visualisation server.

Creating a file like png or jpeg would be nice, but comes with a lot
of graphics overhead. The visualisation uses d3.js so you can load it
in Chrome/Safari/etc and File->Print, and save in the appropriate
format. Since it's all vector, you can get high-quality PDF outputs.

It's possible to auto-capture the diagrams using something like
phantomjs or another headless browser automation package, but involves
getting the css print stylesheets right.

I usually just screenshot my browser for quick mockups, and use print
to PDF for print qualit diagrams.

Thanks
> --
> You received this message because you are subscribed to the Google Groups
> "AutoNetkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to autonetkit+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Jason Edelman

unread,
Nov 3, 2014, 4:51:16 PM11/3/14
to auton...@googlegroups.com
Thanks, Simon!  I did figure that out.  Just saw you responded to my GH issue...will check that out now!

Thanks again,
Jason

You received this message because you are subscribed to a topic in the Google Groups "AutoNetkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/autonetkit/em5fkD7H70M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to autonetkit+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages