You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm sorry to bother you. I used the following program to build the topology, but I don't know what the error message means. Can you help me with it?
# connect hosts with switches
for i in range(1, num_hosts-15):
topo_base["topology"]["links"].append(["h{}".format(i),"s{}".format(1)])
for i in range(num_hosts-15,num_hosts+1):
topo_base["topology"]["links"].append(["h{}".format(i), "s{}".format(2)])
# connect switches
topo_base["topology"]["links"].append(["s{}".format(1), "s{}".format(3)])
topo_base["topology"]["links"].append(["s{}".format(1), "s{}".format(3)])
topo_base["topology"]["links"].append(["s{}".format(2), "s{}".format(3)])
topo_base["topology"]["links"].append(["s{}".format(2), "s{}".format(3)])
topo_base["topology"]["links"].append(["s{}".format(2), "s{}".format(4)])
topo_base["topology"]["links"].append(["s{}".format(2), "s{}".format(4)])
topo_base["topology"]["hosts"] = {"h{0}".format(i): {} for i in range(1, num_hosts+1)}
topo_base["topology"]["switches"] = {"s{0}".format(i): {} for i in range(1, num_switches+1)}
Reading JSON configuration file...
"l3" assignment strategy selected.
Traceback (most recent call last):
File "/usr/local/bin/p4run", line 11, in
load_entry_point('p4utils', 'console_scripts', 'p4run')()
File "/home/p4/p4-tools/p4-utils/p4utils/p4run.py", line 739, in main
verbosity=args.verbosity)
File "/home/p4/p4-tools/p4-utils/p4utils/p4run.py", line 341, in init
self.l3()
File "/home/p4/p4-tools/p4-utils/p4utils/mininetlib/network_API.py", line 2650, in l3
assert not self.is_multigraph()
AssertionError
The text was updated successfully, but these errors were encountered:
I can have a look, but can you please format all the json and python code together and tell me what is what. Or show me the final version of your jsnon topology. Like this is a bit hard to parse.
Hello, I'm sorry to bother you. I used the following program to build the topology, but I don't know what the error message means. Can you help me with it?
import json
import argparse
import networkx
topo_base = {
"p4_src": "collect_flow.p4",
"cli": True,
"pcap_dump": True,
"enable_log": True,
"exec_scripts": [
{
"cmd": "python routing-controller.py",
"reboot_run": True
}
],
"topology": {
"assignment_strategy": "l3",
"default":
{
"bw": 10,
"queue_length": 30000
},
}
}
def create_clos_topo(num_hosts=32,num_switches=4):
topo_base["topology"]["links"] = []
def main():
pass
if name == 'main':
parser = argparse.ArgumentParser()
parser.add_argument('--output_name', type=str, required=False, default="clos_four_switches_4.json")
# parser.add_argument('-n', type=str, required=False, default=4)
# parser.add_argument('-d', type=str, required=False, default=2)
args = parser.parse_args()
# create_clos_topo(int(args.d), int(args.n))
create_clos_topo(32,4)
json.dump(topo_base, open(args.output_name, "w"), sort_keys=True, indent=2)
Reading JSON configuration file...
"l3" assignment strategy selected.
Traceback (most recent call last):
File "/usr/local/bin/p4run", line 11, in
load_entry_point('p4utils', 'console_scripts', 'p4run')()
File "/home/p4/p4-tools/p4-utils/p4utils/p4run.py", line 739, in main
verbosity=args.verbosity)
File "/home/p4/p4-tools/p4-utils/p4utils/p4run.py", line 341, in init
self.l3()
File "/home/p4/p4-tools/p4-utils/p4utils/mininetlib/network_API.py", line 2650, in l3
assert not self.is_multigraph()
AssertionError
The text was updated successfully, but these errors were encountered: