本文整理汇总了Python中mininet.net.Mininet.stopXterms方法的典型用法代码示例。如果您正苦于以下问题:Python Mininet.stopXterms方法的具体用法?Python Mininet.stopXterms怎么用?Python Mininet.stopXterms使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mininet.net.Mininet
的用法示例。
在下文中一共展示了Mininet.stopXterms方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: runMininet
# 需要导入模块: from mininet.net import Mininet [as 别名]
# 或者: from mininet.net.Mininet import stopXterms [as 别名]
def runMininet():
"Create and test a simple network"
topo = TreeTopo(3, 2)
rmController = RemoteController("c0", ip="127.0.0.1", port=6653)
net = Mininet(controller=rmController, topo=topo, link=OVSLink, switch=OVSKernelSwitch, xterms=False, autoSetMacs=False, autoStaticArp=True, cleanup=False)
net.start()
CLI(net)
net.stopXterms()
net.stop()
示例2: runMininet
# 需要导入模块: from mininet.net import Mininet [as 别名]
# 或者: from mininet.net.Mininet import stopXterms [as 别名]
def runMininet():
"Create and test a simple network"
topo = FatTreeTopo()
topo.createTopo()
topo.createLink()
f = open('physical_network_fat.xml', 'a')
f.write("</physical_network>\n")
f.close()
rmController = RemoteController("c0", ip="127.0.0.1", port=6653)
net = Mininet(controller=rmController, topo=topo, link=OVSLink, switch=OVSKernelSwitch, xterms=False, autoSetMacs=False, autoStaticArp=True, cleanup=False)
net.start()
CLI(net)
net.stopXterms()
net.stop()