1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 11:18:11 +00:00

Fix naming of IOU serial interfaces

Fix #737
This commit is contained in:
Julien Duponchelle 2016-10-25 15:26:36 +02:00
parent 9799dabb98
commit 1f44e08cdd
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8
2 changed files with 16 additions and 17 deletions

View File

@ -84,7 +84,6 @@ class StandardPortFactory:
adapter_number += 1 adapter_number += 1
if "serial_adapters" in properties: if "serial_adapters" in properties:
segment_number = 0
for adapter_number in range(adapter_number, properties["serial_adapters"] + adapter_number): for adapter_number in range(adapter_number, properties["serial_adapters"] + adapter_number):
for port_number in range(0, port_by_adapter): for port_number in range(0, port_by_adapter):
ports.append(PortFactory("Serial{}/{}".format(segment_number, port_number), segment_number, adapter_number, port_number, "serial")) ports.append(PortFactory("Serial{}/{}".format(segment_number, port_number), segment_number, adapter_number, port_number, "serial"))

View File

@ -335,8 +335,8 @@ def test_list_ports_iou(compute, project):
"link_type": "ethernet" "link_type": "ethernet"
}, },
{ {
"name": "Serial0/0", "name": "Serial3/0",
"short_name": "s0/0", "short_name": "s3/0",
"data_link_types": { "data_link_types": {
"Frame Relay": "DLT_FRELAY", "Frame Relay": "DLT_FRELAY",
"Cisco HDLC": "DLT_C_HDLC", "Cisco HDLC": "DLT_C_HDLC",
@ -347,8 +347,8 @@ def test_list_ports_iou(compute, project):
"link_type": "serial" "link_type": "serial"
}, },
{ {
"name": "Serial0/1", "name": "Serial3/1",
"short_name": "s0/1", "short_name": "s3/1",
"data_link_types": { "data_link_types": {
"Frame Relay": "DLT_FRELAY", "Frame Relay": "DLT_FRELAY",
"Cisco HDLC": "DLT_C_HDLC", "Cisco HDLC": "DLT_C_HDLC",
@ -359,8 +359,8 @@ def test_list_ports_iou(compute, project):
"link_type": "serial" "link_type": "serial"
}, },
{ {
"name": "Serial0/2", "name": "Serial3/2",
"short_name": "s0/2", "short_name": "s3/2",
"data_link_types": { "data_link_types": {
"Frame Relay": "DLT_FRELAY", "Frame Relay": "DLT_FRELAY",
"Cisco HDLC": "DLT_C_HDLC", "Cisco HDLC": "DLT_C_HDLC",
@ -371,8 +371,8 @@ def test_list_ports_iou(compute, project):
"link_type": "serial" "link_type": "serial"
}, },
{ {
"name": "Serial0/3", "name": "Serial3/3",
"short_name": "s0/3", "short_name": "s3/3",
"data_link_types": { "data_link_types": {
"Frame Relay": "DLT_FRELAY", "Frame Relay": "DLT_FRELAY",
"Cisco HDLC": "DLT_C_HDLC", "Cisco HDLC": "DLT_C_HDLC",
@ -383,8 +383,8 @@ def test_list_ports_iou(compute, project):
"link_type": "serial" "link_type": "serial"
}, },
{ {
"name": "Serial1/0", "name": "Serial4/0",
"short_name": "s1/0", "short_name": "s4/0",
"data_link_types": { "data_link_types": {
"Frame Relay": "DLT_FRELAY", "Frame Relay": "DLT_FRELAY",
"Cisco HDLC": "DLT_C_HDLC", "Cisco HDLC": "DLT_C_HDLC",
@ -395,8 +395,8 @@ def test_list_ports_iou(compute, project):
"link_type": "serial" "link_type": "serial"
}, },
{ {
"name": "Serial1/1", "name": "Serial4/1",
"short_name": "s1/1", "short_name": "s4/1",
"data_link_types": { "data_link_types": {
"Frame Relay": "DLT_FRELAY", "Frame Relay": "DLT_FRELAY",
"Cisco HDLC": "DLT_C_HDLC", "Cisco HDLC": "DLT_C_HDLC",
@ -407,8 +407,8 @@ def test_list_ports_iou(compute, project):
"link_type": "serial" "link_type": "serial"
}, },
{ {
"name": "Serial1/2", "name": "Serial4/2",
"short_name": "s1/2", "short_name": "s4/2",
"data_link_types": { "data_link_types": {
"Frame Relay": "DLT_FRELAY", "Frame Relay": "DLT_FRELAY",
"Cisco HDLC": "DLT_C_HDLC", "Cisco HDLC": "DLT_C_HDLC",
@ -419,8 +419,8 @@ def test_list_ports_iou(compute, project):
"link_type": "serial" "link_type": "serial"
}, },
{ {
"name": "Serial1/3", "name": "Serial4/3",
"short_name": "s1/3", "short_name": "s4/3",
"data_link_types": { "data_link_types": {
"Frame Relay": "DLT_FRELAY", "Frame Relay": "DLT_FRELAY",
"Cisco HDLC": "DLT_C_HDLC", "Cisco HDLC": "DLT_C_HDLC",