本文整理汇总了Python中simulation.Simulation.release方法的典型用法代码示例。如果您正苦于以下问题:Python Simulation.release方法的具体用法?Python Simulation.release怎么用?Python Simulation.release使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类simulation.Simulation
的用法示例。
在下文中一共展示了Simulation.release方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: range
# 需要导入模块: from simulation import Simulation [as 别名]
# 或者: from simulation.Simulation import release [as 别名]
for mac in range(0,VMs):
self.setup_bridge(self.br_array[sub], self.ns_array[x].vethOut)
x+=1
self.create_router("r1",subnet)
self.add_values(subnet,VMs)
#self.test_topology()
try:
no_of_subnets = int(sys.argv[1])
no_of_VMs_in_each_subnet = int(sys.argv[2])
sim = TunnelSimulation(ipdb)
sim.create_topology(no_of_subnets,no_of_VMs_in_each_subnet)
# reading from cat /sys/kernel/debug/tracing/trace_pipe
input("Press enter to quit:")
except Exception as e:
print str(e)
finally:
for bridge in sim.br_array:
if bridge.name in ipdb.interfaces:
ipdb.interfaces[bridge.name].remove().commit()
for dummy in sim.dm_array:
if dummy.name in ipdb.interfaces:
ipdb.interfaces[dummy.name].remove().commit()
sim.del_dummy_ifc("r1")
sim.release()
ipdb.release()