当前位置: 首页>>代码示例>>Python>>正文


Python OVSSwitch.start方法代码示例

本文整理汇总了Python中mininet.node.OVSSwitch.start方法的典型用法代码示例。如果您正苦于以下问题:Python OVSSwitch.start方法的具体用法?Python OVSSwitch.start怎么用?Python OVSSwitch.start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mininet.node.OVSSwitch的用法示例。


在下文中一共展示了OVSSwitch.start方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: start

# 需要导入模块: from mininet.node import OVSSwitch [as 别名]
# 或者: from mininet.node.OVSSwitch import start [as 别名]
 def start( self, *args, **kwargs ):
     OVSSwitch.start( self, *args, **kwargs )
     OVSBridgeSTP.prio += 1
     self.cmd( 'ovs-vsctl set-fail-mode', self, 'standalone' )
     self.cmd( 'ovs-vsctl set Bridge', self,
               'stp_enable=true',
               'other_config:stp-priority=%d' % OVSBridgeSTP.prio )
开发者ID:fmorgner,项目名称:cldinf-lab-8,代码行数:9,代码来源:clos.py

示例2: emptyNet

# 需要导入模块: from mininet.node import OVSSwitch [as 别名]
# 或者: from mininet.node.OVSSwitch import start [as 别名]
def emptyNet():

    net = Mininet(topo=None, build=False)
    c0 = Controller('c0', inNamespace=False)

    h1 = Host('h1')
    h2 = Host('h2')
    #intf1 = Intf("h1-eth1")
    #intf2 = Intf("h2-eth1")
    s1 = OVSSwitch('br0', inNamespace=False)    

    Link(h1, s1)
    Link(h2, s1)


    c0.start()
    s1.start([c0])

    net.start()    
    #s1.cmd('ovs-vsctl set bridge br0 protocols=OpenFlow13')
    CLI(net)

    net.stop()
    h1.stop()
    h2.stop()
    s1.stop()
    c0.stop()
开发者ID:exuuwen,项目名称:study,代码行数:29,代码来源:mininet_basic.py

示例3: start

# 需要导入模块: from mininet.node import OVSSwitch [as 别名]
# 或者: from mininet.node.OVSSwitch import start [as 别名]
 def start(self, controllers):
     # Call superclass constructor
     OVSSwitch.start(self, controllers)
     # Set OpenFlow VersionsHost
     self.configureOpenFlowVersion()
     # Set Switch IP address
     if self.switchIP is not None:
         self.cmd('ifconfig', self, self.switchIP)
开发者ID:fredericoschardong,项目名称:escape,代码行数:10,代码来源:CustomNetworkElements.py

示例4: start

# 需要导入模块: from mininet.node import OVSSwitch [as 别名]
# 或者: from mininet.node.OVSSwitch import start [as 别名]
 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
     OVSSwitch.start( self, controllers=controller_list )
开发者ID:opennetworkinglab,项目名称:spring-open,代码行数:11,代码来源:start_topo.py

示例5: start

# 需要导入模块: from mininet.node import OVSSwitch [as 别名]
# 或者: from mininet.node.OVSSwitch import start [as 别名]
 def start( self, controllers ):
     return OVSSwitch.start( self, [ cmap[ self.name ] ] )
开发者ID:CThaw90,项目名称:SDNHeaderAuthentication,代码行数:4,代码来源:simple_topo.py

示例6: start

# 需要导入模块: from mininet.node import OVSSwitch [as 别名]
# 或者: from mininet.node.OVSSwitch import start [as 别名]
 def start(self, controllers):
     if self.custom_ctrl is not None:
         return OVSSwitch.start(self, [self.custom_ctrl])
     else:
         return OVSSwitch.start(self, controllers)
开发者ID:mpeuster,项目名称:estate,代码行数:7,代码来源:topology.py

示例7: start

# 需要导入模块: from mininet.node import OVSSwitch [as 别名]
# 或者: from mininet.node.OVSSwitch import start [as 别名]
 def start( self, controllers ):
     assert len( controllers ) == 1
     c0 = controllers[ 0 ]
     assert type( c0 ) == ONOSCluster
     controllers = c0.clist()
     OVSSwitch.start( self, controllers )
开发者ID:packet-tracker,项目名称:onos-1.3.0,代码行数:8,代码来源:onos.py

示例8: start

# 需要导入模块: from mininet.node import OVSSwitch [as 别名]
# 或者: from mininet.node.OVSSwitch import start [as 别名]
 def start(self, controllers):
     # This switch should always have no controllers
     OVSSwitch.start(self, [])
开发者ID:ckannan,项目名称:iSDX,代码行数:5,代码来源:sdnip.py

示例9: start

# 需要导入模块: from mininet.node import OVSSwitch [as 别名]
# 或者: from mininet.node.OVSSwitch import start [as 别名]
 def start(self, controllers):
     print(self.name)
     return OVSSwitch.start(self, [_controllers[_translation[self.name]]])
开发者ID:nolive3,项目名称:AdaptiveNetworkIDS,代码行数:5,代码来源:hometopo.py

示例10: start

# 需要导入模块: from mininet.node import OVSSwitch [as 别名]
# 或者: from mininet.node.OVSSwitch import start [as 别名]
 def start(self, controllers):
     return OVSSwitch.start(self, controllers)
开发者ID:ShakhMoves,项目名称:ShakhSDVPN,代码行数:4,代码来源:mswitch.py

示例11: start

# 需要导入模块: from mininet.node import OVSSwitch [as 别名]
# 或者: from mininet.node.OVSSwitch import start [as 别名]
 def start(self, controllers):
     print "%s : %s" % (self.name, str(cmap.get(self.name, [])))
     return OVSSwitch.start(self, cmap.get(self.name, []))
开发者ID:TonyWang123,项目名称:wan-optimizer-onug-spring-2014,代码行数:5,代码来源:topology.py

示例12: Host

# 需要导入模块: from mininet.node import OVSSwitch [as 别名]
# 或者: from mininet.node.OVSSwitch import start [as 别名]
#!/usr/bin/python

from mininet.topo import Topo
from mininet.node import Host, OVSSwitch, Controller
from mininet.link import Link

h1 = Host('h1')
h2 = Host('h2')
s1 = OVSSwitch('s1', inNamespace=False)
c0 = Controller('c0', inNamespace=False)
Link(h1,s1)
Link(h2,s1)
h1.setIP('10.1/8')
h2.setIP('10.2/8')
c0.start()
s1.start([c0])
print h1.cmd('ping -c1', h2.IP())
s1.stop()
c0.stop()
开发者ID:zhenyu-zhou,项目名称:mininet_script,代码行数:21,代码来源:low.py

示例13: start

# 需要导入模块: from mininet.node import OVSSwitch [as 别名]
# 或者: from mininet.node.OVSSwitch import start [as 别名]
 def start(self, controllers):
     self.init_map(controllers[1:])
     return OVSSwitch.start(self, [self.map[self.name]])
开发者ID:jyzhe,项目名称:beehive-netctrl,代码行数:5,代码来源:fattree.py

示例14: start

# 需要导入模块: from mininet.node import OVSSwitch [as 别名]
# 或者: from mininet.node.OVSSwitch import start [as 别名]
 def start( self, controllers ):
     print "starting ", self.name
     return OVSSwitch.start( self, [ cmap[ self.name ] ] )
开发者ID:snlab,项目名称:utilities,代码行数:5,代码来源:ysn_8.py

示例15: start

# 需要导入模块: from mininet.node import OVSSwitch [as 别名]
# 或者: from mininet.node.OVSSwitch import start [as 别名]
 def start(self, controllers):
     my_num = int(self.name[1:]) - 1
     return OVSSwitch.start(self, [controllers[my_num % len(controllers)]])
开发者ID:jackowayed,项目名称:pronghorn-experiments,代码行数:5,代码来源:experiments.py


注:本文中的mininet.node.OVSSwitch.start方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。