Revision 548580d8

View differences:

mininet/net.py
214 214

  
215 215
    # BL: is this better than just using nameToNode[] ?
216 216
    # Should it have a better name?
217
    def getNodeByName( self, nodeName ):
218
        "Return node with given name"
219
        return self.nameToNode[ nodeName ]
217
    def getNodeByName( self, *args ):
218
        "Return node(s) with given name(s)"
219
        if len( args ) == 1:
220
            return self.nameToNode[ args[ 0 ] ]
221
        return [ self.nameToNode[ n ] for n in args ]
220 222

  
221 223
    def addLink( self, node1, node2, port1=None, port2=None,
222 224
                 cls=None, **params ):

Also available in: Unified diff