示例#1
0
 def __init__( self, *args, **kwargs ):
     self.activeNodes = []
     # TODO: can we get super to use super's nodes()?
     super( DynamicONOSCluster, self ).__init__( *args, **kwargs )
     self.activeNodes = [ h for h in self.net.hosts if onos.isONOSNode( h ) ]
     onos.updateNodeIPs( self.env, self.nodes() )
     self.activeNodes = []
示例#2
0
 def start( self ):
     "Start up ONOS control network"
     info( '*** ONOS_APPS = %s\n' % onos.ONOS_APPS )
     self.net.start()
     for node in self.net.hosts:
         if onos.isONOSNode( node ):
             node.start( self.env, self.nodes() )
         else:
             try:
                 node.start()
             except AttributeError:
                 # NAT doesn't have start?
                 pass
     info( '\n' )
     self.configPortForwarding( ports=self.forward, action='A' )
     self.waitStarted()
     return