示例#1
0
 def start( self, controllers ):
     # make sure controllers contains only a ControllerCluster
     assert len( controllers ) == 1
     ccluster = controllers[ 0 ]
     assert type( ccluster ) == ControllerCluster
     
     controller_list = ccluster.clist( self.name )
     # TODO: manage order of controllers to control mastership
     UserSwitch.start( self, controllers=controller_list )
 def start(self, controllers):
     # Call superclass constructor
     UserSwitch.start(self, controllers)
     # Set Switch IP address
     if self.switchIP is not None:
         if not self.inNamespace:
             self.cmd('ifconfig', self, self.switchIP)
         else:
             self.cmd('ifconfig lo', self.switchIP)
示例#3
0
文件: meter2.py 项目: Goldiorl/CSE222
 def __init__(self, name, **kwargs):
     UserSwitch.__init__(self, name,'' , **kwargs)
示例#4
0
 def __init__(self, name, **kwargs):
     UserSwitch.__init__(self, name, '', **kwargs)
示例#5
0
文件: topo.py 项目: 0xdyu/NetEx
 def start( self, controllers ):
     return UserSwitch.start( self, [ca])
示例#6
0
 def start(self, controllers):
     return UserSwitch.start(self, [cmap[self.name]])
 def __init__(self, name, dpopts='--no-slicing', **kwargs):
     UserSwitch.__init__(self, name, dpopts, **kwargs)
     self.switchIP = None