def ana_diff(): time_start = time.clock() changes = diff(gr1, gr2) for key in changes: if len(changes[key]) > 0: print key, changes[key] print "Topology diff execution time:", time.clock() - time_start, "seconds"
def topo_draw(): impacts = spofs(gr1) # gr1.remove_node('RST-BAK01') changes = diff(gr1, gr2) for key in impacts: print key, impacts[key] for key in changes: print key, changes[key] time_start = time.clock() # draw(gr1, impacts, changes) # draw(gr1, impacts, return_svg=True) topo_entry = draw(gr1, impacts, save_svg=False, return_svg=True, return_graphml=True) print topo_entry['graphml'] print topo_entry['svg'] # draw(gr1) print "Topology drawing execution time:", time.clock() - time_start, "seconds"