Revision 18aab5b7 mininet/node.py

View differences:

mininet/node.py
888 888

  
889 889
    def connected( self ):
890 890
        "Is the switch connected to a controller? (override this method)"
891
        raise NotImplementedError( "connected() needs to be implemented in"
892
                                   " Switch subclass %s" % self.__class__ )
891
        warn( "Warning: connected() needs to be implemented in"
892
              " Switch subclass %s\n" % self.__class__ )
893
        return True
893 894

  
894 895
    def __repr__( self ):
895 896
        "More informative string representation"
......
1290 1291
        return self.cmd( 'ovs-ofctl ' + ' '.join( args ) +
1291 1292
                         ' tcp:127.0.0.1:%i' % self.listenPort )
1292 1293

  
1293
    def connected( self ):
1294
        "For now, return True since we can't tell if we're connected"
1295
        return True
1296

  
1297 1294

  
1298 1295
class Controller( Node ):
1299 1296
    """A Controller is a Node that is running (or has execed?) an

Also available in: Unified diff