其他分享
首页 > 其他分享> > run_exercise.py

run_exercise.py

作者:互联网

输入:

  1. 拓扑文件,格式如下。注意:

    • 指定:主机名、交换机名、链路名 + 流表项文件名(对应交换机)
    • 无需指定:IP地址、MAC地址(run_exercise.py生成)
    字典格式:key:"hosts",value:是一个list
    {
    	"hosts": [
    		"h1",
    		"h2",
    		"h3"
    	],
    	"switches": {
    		"s1": { "runtime_json" : "s1-runtime.json" },
    		"s2": { "runtime_json" : "s2-runtime.json" },
    		"s3": { "runtime_json" : "s3-runtime.json" }
    	},
    	"links": [
    		["h1", "s1"], ["s1", "s2"], ["s1", "s3"], 
    		["s3", "s2"], ["s2", "h2"], ["s3", "h3"]
    	]
    }
    

标签:run,s3,s2,s1,py,h2,json,runtime,exercise
来源: https://www.cnblogs.com/p4p4p4/p/15241550.html