用python文件创建mininet拓扑

来源:互联网 发布:cmmi软件过程管理体系 编辑:程序博客网 时间:2024/06/06 15:03

topo.py

  1. import os
  2. def mininet():
  3.     print "start"
  4.     MN_CLI = "sudo mn --custom /home/ubuntu/sdn/mininet/mininet/custom/mytopo.py --topo mytopo --mac --controller=remote,ip=115.159.213.122,port=6633"
  5.     body = os.popen(MN_CLI).readlines()
  6.     print body
  7.     return body
  8. mininet()


命令行运行 sudo python topo.py


0 0
原创粉丝点击