mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 03:08:14 +00:00
Correct link are not connected to the correct ethernet switch port after conversion
Fix https://github.com/GNS3/gns3-gui/issues/1797
This commit is contained in:
parent
f90e6f2f5b
commit
dc40b0296e
@ -341,6 +341,8 @@ def _convert_1_3_later(topo, topo_path):
|
||||
|
||||
node_id_to_node_uuid[old_node["id"]] = node["node_id"]
|
||||
for port in old_node.get("ports", []):
|
||||
if node["node_type"] in ("ethernet_hub", "ethernet_switch"):
|
||||
port["port_number"] -= 1
|
||||
ports[port["id"]] = port
|
||||
new_topo["topology"]["nodes"].append(node)
|
||||
|
||||
|
@ -14,7 +14,23 @@
|
||||
}
|
||||
],
|
||||
"drawings": [],
|
||||
"links": [],
|
||||
"links": [
|
||||
{
|
||||
"link_id": "ANYUUID",
|
||||
"nodes": [
|
||||
{
|
||||
"port_number": 1,
|
||||
"node_id": "ANYUUID",
|
||||
"adapter_number": 0
|
||||
},
|
||||
{
|
||||
"port_number": 1,
|
||||
"node_id": "ANYUUID",
|
||||
"adapter_number": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"compute_id": "local",
|
||||
|
@ -4,6 +4,16 @@
|
||||
"project_id": "644e3892-4a50-4457-9601-2234d4842169",
|
||||
"revision": 4,
|
||||
"topology": {
|
||||
"links": [
|
||||
{
|
||||
"description": "",
|
||||
"destination_node_id": 3,
|
||||
"destination_port_id": 10,
|
||||
"id": 1,
|
||||
"source_node_id": 2,
|
||||
"source_port_id": 2
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"description": "ATM switch",
|
||||
|
Loading…
Reference in New Issue
Block a user