@@ -62,8 +62,8 @@ def add_switch(self, name, **opts):
6262 result = self .add_node (name , is_switch = True , ** opts )
6363 return result
6464
65- def add_link (self , node1 , node2 , port1 = None , port2 = None ,
66- * default , * *opts ):
65+ def add_link (self , node1 , node2 , port1 = None , port2 = None ,
66+ ** opts ):
6767 """node1, node2: nodes to link together
6868 port1, port2: ports (optional)
6969 opts: link options (optional)
@@ -147,7 +147,7 @@ def linkInfo( self, src, dst ):
147147 "Return link metadata"
148148 src , dst = self .sorted ([src , dst ])
149149 return self .link_info [(src , dst )]
150-
150+
151151 def nodeInfo ( self , name ):
152152 "Return metadata (dict) for node"
153153 info = self .node_info [ name ]
@@ -181,7 +181,7 @@ def __init__(self, k=2, **opts):
181181 self .add_link (host , switch )
182182
183183
184- class SingleSwitchReversedTopo (SingleSwitchTopo ):
184+ class SingleSwitchReversedTopo (Topo ):
185185 '''Single switch connected to k hosts, with reversed ports.
186186
187187 The lowest-numbered host is connected to the highest-numbered port.
@@ -194,12 +194,12 @@ def __init__(self, k=2, **opts):
194194 @param k number of hosts
195195 @param enable_all enables all nodes and switches?
196196 '''
197- super (SingleSwitchTopo , self ).__init__ (** opts )
197+ super (SingleSwitchReversedTopo , self ).__init__ (** opts )
198198 self .k = k
199199 switch = self .add_switch ('s1' )
200200 for h in irange (1 , k ):
201201 host = self .add_host ('h%s' % h )
202- self .add_link (host , switch ,
202+ self .add_link (host , switch ,
203203 port1 = 0 , port2 = (k - h + 1 ))
204204
205205class LinearTopo (Topo ):
0 commit comments