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


Python node.OVSSwitch类代码示例

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


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

示例1: emptyNet

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,代码行数:27,代码来源:mininet_basic.py

示例2: start

 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,代码行数:7,代码来源:clos.py

示例3: start

 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,代码行数:8,代码来源:CustomNetworkElements.py

示例4: batchShutdown

 def batchShutdown( cls, switches, **_kwargs ):
     "Stop switches in per-server batches"
     key = attrgetter( 'server' )
     for server, switchGroup in groupby( sorted( switches, key=key ), key ):
         info( '(%s)' % server )
         group = tuple( switchGroup )
         switch = group[ 0 ]
         OVSSwitch.batchShutdown( group, run=switch.rcmd )
     return switches
开发者ID:xiaozhou,项目名称:mininet,代码行数:9,代码来源:cluster.py

示例5: start

 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,代码行数:9,代码来源:start_topo.py

示例6: run

def run():
    OVSSwitch.setup()
    setLogLevel('debug')

    net = Mininet(topo=KeepForwardingSmartDownlinkTestTopo(),
                  switch=OVSSwitch,
                  controller=RemoteController)
    net.start()
    CLI(net)
    net.stop()
开发者ID:BenjaminUJun,项目名称:ryuo,代码行数:10,代码来源:keep_forwarding_smart_downlink_test_topo.py

示例7: run

def run():
    OVSSwitch.setup()
    setLogLevel('debug')

    net = Mininet(
        topo=FailoverTestTopo(),
        switch=OVSSwitch,
        controller=RemoteController)
    net.start()
    CLI(net)
    net.stop()
开发者ID:BenjaminUJun,项目名称:ryuo,代码行数:11,代码来源:failover-test-topo.py

示例8: batchStartup

 def batchStartup( cls, switches ):
     result = []
     for ovsdb, switchGroup in groupby( switches, attrgetter( 'ovsdb') ):
         switchGroup = list( switchGroup )
         info( '(%s)' % ovsdb )
         result += OVSSwitch.batchStartup( switchGroup, run=ovsdb.cmd )
     return result
开发者ID:AntonySilvester,项目名称:OnosSystemTest,代码行数:7,代码来源:multiovs.py

示例9: batchShutdown

 def batchShutdown( cls, switches ):
     result = []
     for ovsdb, switchGroup in groupby( switches, attrgetter( 'ovsdb') ):
         switchGroup = list( switchGroup )
         info( '(%s)' % ovsdb )
         for switch in switches:
             if switch.pid == ovsdb.pid:
                 switch.pid = None
                 switch.shell = None
         result += OVSSwitch.batchShutdown( switchGroup, run=ovsdb.cmd )
         for switch in switchGroup:
             switch.ovsdbFree()
     return result
开发者ID:AntonySilvester,项目名称:OnosSystemTest,代码行数:13,代码来源:multiovs.py

示例10: start

 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,代码行数:5,代码来源:topology.py

示例11: stop

 def stop( self ):
     for intf in self.intfList():
         if type( intf ) is TCIntf:
             self.dropOVSqos( intf )
     OVSSwitch.stop( self )
开发者ID:brownsys,项目名称:pane-demo-vm,代码行数:5,代码来源:PaneDemoUtil.py

示例12: __init__

 def __init__(self, name, **params):
     OVSSwitch.__init__(self, name=name, datapath="kernel", **params)
开发者ID:REANNZ,项目名称:faucet,代码行数:2,代码来源:faucet_mininet_test_base.py

示例13: __init__

 def __init__(self, name, reliability=1.0, **params):
     OVSSwitch.__init__(self, name, failMode='secure', datapath='kernel', inband=False, protocols=None, **params)
     self.reliability = reliability
     self._online = True
     self.cmd("sysctl -w net.ipv6.conf.all.disable_ipv6=1")
     self.cmd("sysctl -w net.ipv6.conf.default.disable_ipv6=1")
开发者ID:UdS-TelecommunicationsLab,项目名称:VirtualTestbed,代码行数:6,代码来源:sdn.py

示例14: __init__

 def __init__(self, name, vtep, **params):
     self.vtep = vtep
     OVSSwitch.__init__(self, name, **params)
开发者ID:opendaylight,项目名称:faas,代码行数:3,代码来源:faas_mininet_launch.py

示例15: start

 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,代码行数:6,代码来源:onos.py


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