topo: make new minimal Graph object a Graph, not a DiGraph
Fixes another Graph regression relative to NetworkX. RipL broke because the NetworkX Graph object that was used previously for topologies is an undirected graph: >>> import networkx as nx >>> g=nx.Graph() >>> g.add_edge(0,1) >>> g[1] {0: {}} >>> g[0] {1: {}} There is a separate DiGraph object in NetworkX for directed behavior. The minimal replacement previously implemented DiGraph behavior. >>> from mininet.topo import Graph >>> g2=Graph() >>> g2.add_edge(0,1) >>> g2[0] [1] >>> g2[1] [] This commit restores undirected graph behavior.
Please register or sign in to comment