• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python node.OVSSwitch类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: start

 def start( self, controllers ):
     print "starting ", self.name
     return OVSSwitch.start( self, [ cmap[ self.name ] ] )
开发者ID:snlab,项目名称:utilities,代码行数:3,代码来源:ysn_8.py


示例17: start

 def start(self, controllers):
     return OVSSwitch.start(self, controllers)
开发者ID:ShakhMoves,项目名称:ShakhSDVPN,代码行数:2,代码来源:mswitch.py


示例18: addIntf

 def addIntf( self, intf, rename=False, **kwargs ):
     "Add (and reparent) an interface"
     OVSSwitch.addIntf( self, intf, **kwargs )
     intf.node = self
     if rename:
         self.renameIntf( intf )
开发者ID:DeepnessLab,项目名称:moly,代码行数:6,代码来源:mobility.py


示例19: start

 def start(self, controllers):
     self.init_map(controllers[1:])
     return OVSSwitch.start(self, [self.map[self.name]])
开发者ID:jyzhe,项目名称:beehive-netctrl,代码行数:3,代码来源:fattree.py


示例20: __init__

 def __init__( self, *args, **kwargs ):
     kwargs.update( datapath='user' )
     OVSSwitch.__init__( self, *args, **kwargs )
开发者ID:Rabbi18,项目名称:SDNProject,代码行数:3,代码来源:test_switchdpidassignment.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python node.Switch类代码示例发布时间:2022-05-27
下一篇:
Python node.Node类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap