Minor changes

This commit is contained in:
Loic Guegan 2022-09-11 07:57:31 +02:00
parent 4b3cc0aa4e
commit be1966b40f
2 changed files with 6 additions and 6 deletions

View file

@ -98,11 +98,10 @@ class YAMLPlatformFile:
self.parsing_error("Invalid interface type \""+interfaces[i]["type"]+"\"") self.parsing_error("Invalid interface type \""+interfaces[i]["type"]+"\"")
is_wired=interfaces[i]["type"] == "wired" is_wired=interfaces[i]["type"] == "wired"
links=list() links=list()
if type(interfaces[i]["links"]) == list: if type(interfaces[i]["links"]) != list:
for link in interfaces[i]["links"]: self.parsing_error("Invalide type of links in interface "+i)
links.append(self.parse_link(link)) for link in interfaces[i]["links"]:
else: links.append(self.parse_link(link))
links.append(self.parse_link(interfaces[i]["links"]))
##### Create network matrix ##### Create network matrix
BW=np.full((node_count,node_count),0) BW=np.full((node_count,node_count),0)
LAT=np.full((node_count,node_count),0) LAT=np.full((node_count,node_count),0)

View file

@ -18,4 +18,5 @@ interfaces:
- all 1Bps 10s - all 1Bps 10s
eth0: eth0:
type: "wired" type: "wired"
links: all 5Mbps 10s all links:
- all 5Mbps 10s all