资源简介
#!/usr/bin/python
from mininet.topo import Topo
from mininet.net import Mininet
from mininet.util import irange,dumpNodeConnections
from mininet.log import setLogLevel
class LinearTopo(Topo):
"Linear topology of k switches, with one host per seitch"
def __init__(self, k=2, **opts):
代码片段和文件信息
#!/usr/bin/python
from mininet.topo import Topo
from mininet.net import Mininet
from mininet.util import irangedumpNodeConnections
from mininet.log import setLogLevel
class LinearTopo(Topo):
“Linear topology of k switches with one host per seitch“
def __init__(self k=2 **opts):
“““Init.
k: number of switches (and hosts)
hconf: host configuration options
lconf: ling configuration options“““
super(LinearTopo self).__init__(**opts)
self.k = k
“““creates 7 switchs“““
switch1 = self.addSwitch(‘s1‘)
switch2 = self.addSwitch(‘s2‘)
switch3 = self.addSwitch(‘s3‘)
switch4 = self.addSwitch(‘s4‘)
switch5 = self.addSwitch(‘s5‘)
switch6 = self.addSwitch(‘s6‘)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-05-02 09:37 实验2\
文件 2791 2013-11-26 20:00 实验2\datacenter.py
文件 212992 2014-03-26 08:57 实验2\实验报告.doc
- 上一篇:图论基本算法python实现
- 下一篇:ID3代码和测试数据集
评论
共有 条评论