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

Python util.makeIntfPair函数代码示例

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

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



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

示例1: makeIntfPair

 def makeIntfPair( cls, intf1, intf2 ):
     """Create pair of interfaces
        intf1: name of interface 1
        intf2: name of interface 2
        (override this class method [and possibly delete()]
        to change link type)"""
     makeIntfPair( intf1, intf2  )
开发者ID:RuiZhou,项目名称:mininet,代码行数:7,代码来源:link.py


示例2: makeIntfPair

 def makeIntfPair(cls,
                  intfname1,
                  intfname2,
                  addr1=None,
                  addr2=None,
                  node1=None,
                  node2=None,
                  deleteIntfs=True):
     """Create pair of interfaces
        intfname1: name for interface 1
        intfname2: name for interface 2
        addr1: MAC address for interface 1 (optional)
        addr2: MAC address for interface 2 (optional)
        node1: home node for interface 1 (optional)
        node2: home node for interface 2 (optional)
        (override this method [and possibly delete()]
        to change link type)"""
     # Leave this as a class method for now
     assert cls
     return makeIntfPair(
         intfname1,
         intfname2,
         addr1,
         addr2,
         node1,
         node2,
         deleteIntfs=deleteIntfs)
开发者ID:p4lang,项目名称:mininet,代码行数:27,代码来源:link.py


示例3: makeIntfPair

 def makeIntfPair( _cls, intfname1, intfname2, addr1=None, addr2=None ):
     """Create pair of interfaces
        intfname1: name of interface 1
        intfname2: name of interface 2
        (override this method [and possibly delete()]
        to change link type)"""
     return makeIntfPair( intfname1, intfname2, addr1, addr2 )
开发者ID:Mo-hammad,项目名称:mininet,代码行数:7,代码来源:link.py


示例4: makeIntfPair

 def makeIntfPair( cls, intfname1, intfname2, addr1=None, addr2=None ):
     """Create pair of interfaces
        intfname1: name of interface 1
        intfname2: name of interface 2
        (override this method [and possibly delete()]
        to change link type)"""
     # Leave this as a class method for now
     assert cls
     return makeIntfPair( intfname1, intfname2, addr1, addr2 )
开发者ID:Rabbi18,项目名称:SDNProject,代码行数:9,代码来源:link.py


示例5: linkTo

 def linkTo( self, node2, port1=None, port2=None ):
     """Create link to another node, making two new interfaces.
        node2: Node to link us to
        port1: our port number (optional)
        port2: node2 port number (optional)
        returns: intf1 name, intf2 name"""
     node1 = self
     if port1 is None:
         port1 = node1.newPort()
     if port2 is None:
         port2 = node2.newPort()
     intf1 = node1.intfName( port1 )
     intf2 = node2.intfName( port2 )
     makeIntfPair( intf1, intf2 )
     node1.addIntf( intf1, port1 )
     node2.addIntf( intf2, port2 )
     node1.registerIntf( intf1, node2, intf2 )
     node2.registerIntf( intf2, node1, intf1 )
     return intf1, intf2
开发者ID:ssujoysaha,项目名称:myfiles,代码行数:19,代码来源:node.py


示例6: makeIntfPair

 def makeIntfPair( self, intfname1, intfname2, addr1=None, addr2=None ):
     """Create pair of interfaces
         intfname1: name of interface 1
         intfname2: name of interface 2
         (override this method [and possibly delete()]
         to change link type)"""
     node1, node2 = self.node1, self.node2
     server1 = getattr( node1, 'server', 'localhost' )
     server2 = getattr( node2, 'server', 'localhost' )
     if server1 == 'localhost' and server2 == 'localhost':
         # Local link
         return makeIntfPair( intfname1, intfname2, addr1, addr2 )
     elif server1 == server2:
         # Remote link on same remote server
         return makeIntfPair( intfname1, intfname2, addr1, addr2,
                              run=node1.rcmd )
     # Otherwise, make a tunnel
     self.tunnel = self.makeTunnel( node1, node2, intfname1, intfname2, addr1, addr2 )
     return self.tunnel
开发者ID:awfeequdng,项目名称:SDN-TEST,代码行数:19,代码来源:cluster.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python util.netParse函数代码示例发布时间:2022-05-27
下一篇:
Python util.macColonHex函数代码示例发布时间: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