Minor code cleanup

This commit is contained in:
Bob Lantz
2014-11-23 17:17:21 -08:00
parent 37bdf14b49
commit e0bf8ece3c
14 changed files with 8 additions and 194 deletions
+1 -1
View File
@@ -32,6 +32,7 @@ class ClusterCLI( CLI ):
import networkx as nx
import matplotlib.pyplot as plt
import pygraphviz
assert pygraphviz # silence pyflakes
except:
error( 'plot requires networkx, matplotlib and pygraphviz - '
'please install them and try again\n' )
@@ -40,7 +41,6 @@ class ClusterCLI( CLI ):
g = nx.Graph()
mn = self.mn
servers, hosts, switches = mn.servers, mn.hosts, mn.switches
hlen, slen = len( hosts ), len( switches )
nodes = hosts + switches
g.add_nodes_from( nodes )
links = [ ( link.intf1.node, link.intf2.node )