diff --git a/napalm/nxos_ssh/nxos_ssh.py b/napalm/nxos_ssh/nxos_ssh.py index 5a71662a8..50633fef6 100644 --- a/napalm/nxos_ssh/nxos_ssh.py +++ b/napalm/nxos_ssh/nxos_ssh.py @@ -119,7 +119,7 @@ def parse_intf_section(interface): else: # More standard is up, next line admin state is lines match = re.search(re_intf_name_state, interface) - intf_name = canonical_interface_name(match.group("intf_name")) + intf_name = match.group("intf_name") intf_state = match.group("intf_state").strip() is_up = True if intf_state == "up" else False diff --git a/test/nxos_ssh/mocked_data/test_get_interfaces/N93180_7_0_3_I7_2/expected_result.json b/test/nxos_ssh/mocked_data/test_get_interfaces/N93180_7_0_3_I7_2/expected_result.json index 5cc5ea688..5dc294762 100644 --- a/test/nxos_ssh/mocked_data/test_get_interfaces/N93180_7_0_3_I7_2/expected_result.json +++ b/test/nxos_ssh/mocked_data/test_get_interfaces/N93180_7_0_3_I7_2/expected_result.json @@ -98,7 +98,7 @@ "mtu": 1500, "speed": 25000 }, - "Port-channel93": { + "port-channel93": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -224,7 +224,7 @@ "mtu": 9216, "speed": -1 }, - "Port-channel1": { + "port-channel1": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -305,7 +305,7 @@ "mtu": 1500, "speed": 10000 }, - "Port-channel34": { + "port-channel34": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -314,7 +314,7 @@ "mtu": 1500, "speed": 10000 }, - "Port-channel37": { + "port-channel37": { "is_enabled": false, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -323,7 +323,7 @@ "mtu": 9216, "speed": 100 }, - "Port-channel30": { + "port-channel30": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -341,7 +341,7 @@ "mtu": 1500, "speed": 10000 }, - "Port-channel33": { + "port-channel33": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -350,7 +350,7 @@ "mtu": 1500, "speed": 10000 }, - "Port-channel20": { + "port-channel20": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -377,7 +377,7 @@ "mtu": 1500, "speed": 1000 }, - "Management0": { + "mgmt0": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -458,7 +458,7 @@ "mtu": 1500, "speed": 10000 }, - "Port-channel29": { + "port-channel29": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -512,7 +512,7 @@ "mtu": 1500, "speed": 10000 }, - "Port-channel23": { + "port-channel23": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -521,7 +521,7 @@ "mtu": 1500, "speed": 10000 }, - "Port-channel22": { + "port-channel22": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -548,7 +548,7 @@ "mtu": 1500, "speed": 10000 }, - "Port-channel26": { + "port-channel26": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -557,7 +557,7 @@ "mtu": 1500, "speed": 10000 }, - "Port-channel25": { + "port-channel25": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -566,7 +566,7 @@ "mtu": 1500, "speed": 10000 }, - "Port-channel24": { + "port-channel24": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -575,7 +575,7 @@ "mtu": 1500, "speed": 10000 }, - "Port-channel16": { + "port-channel16": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -584,7 +584,7 @@ "mtu": 1500, "speed": 10000 }, - "Loopback1": { + "loopback1": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -629,7 +629,7 @@ "mtu": 1500, "speed": 25000 }, - "Port-channel99": { + "port-channel99": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -674,7 +674,7 @@ "mtu": 1500, "speed": 25000 }, - "Port-channel92": { + "port-channel92": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -692,7 +692,7 @@ "mtu": 1500, "speed": 25000 }, - "Port-channel96": { + "port-channel96": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -701,7 +701,7 @@ "mtu": 1500, "speed": 1000 }, - "Port-channel97": { + "port-channel97": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -710,7 +710,7 @@ "mtu": 1500, "speed": 1000 }, - "Port-channel94": { + "port-channel94": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -719,7 +719,7 @@ "mtu": 1500, "speed": 10000 }, - "Port-channel95": { + "port-channel95": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -728,7 +728,7 @@ "mtu": 1500, "speed": 10000 }, - "Port-channel13": { + "port-channel13": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -737,7 +737,7 @@ "mtu": 1500, "speed": 10000 }, - "Port-channel10": { + "port-channel10": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -746,7 +746,7 @@ "mtu": 1500, "speed": 10000 }, - "Port-channel11": { + "port-channel11": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -755,7 +755,7 @@ "mtu": 1500, "speed": 100 }, - "Loopback0": { + "loopback0": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -764,7 +764,7 @@ "mtu": 1500, "speed": 8000 }, - "Port-channel17": { + "port-channel17": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -773,7 +773,7 @@ "mtu": 1500, "speed": 10000 }, - "Port-channel14": { + "port-channel14": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -782,7 +782,7 @@ "mtu": 1500, "speed": 10000 }, - "Port-channel15": { + "port-channel15": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -791,7 +791,7 @@ "mtu": 1500, "speed": 10000 }, - "Port-channel18": { + "port-channel18": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -800,7 +800,7 @@ "mtu": 1500, "speed": 10000 }, - "Port-channel19": { + "port-channel19": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, @@ -809,7 +809,7 @@ "mtu": 1500, "speed": 10000 }, - "Port-channel21": { + "port-channel21": { "is_enabled": true, "description": "*** LIBRE ***", "last_flapped": -1.0, diff --git a/test/nxos_ssh/mocked_data/test_get_interfaces/alternate1/expected_result.json b/test/nxos_ssh/mocked_data/test_get_interfaces/alternate1/expected_result.json index a3b95a391..4d93144e4 100644 --- a/test/nxos_ssh/mocked_data/test_get_interfaces/alternate1/expected_result.json +++ b/test/nxos_ssh/mocked_data/test_get_interfaces/alternate1/expected_result.json @@ -26,7 +26,7 @@ "mtu": 1500, "speed": 1000.0 }, - "Management0": { + "mgmt0": { "is_enabled": true, "description": "", "last_flapped": -1, @@ -44,7 +44,7 @@ "mtu": 1500, "speed": 1000.0 }, - "Loopback0": { + "loopback0": { "is_enabled": true, "description": "", "last_flapped": -1, @@ -62,7 +62,7 @@ "mtu": 1500, "speed": 1000.0 }, - "Loopback55": { + "loopback55": { "is_enabled": true, "description": "", "last_flapped": -1, diff --git a/test/nxos_ssh/mocked_data/test_get_interfaces/missing_mtu/expected_result.json b/test/nxos_ssh/mocked_data/test_get_interfaces/missing_mtu/expected_result.json index e82b4050b..1b628d33c 100644 --- a/test/nxos_ssh/mocked_data/test_get_interfaces/missing_mtu/expected_result.json +++ b/test/nxos_ssh/mocked_data/test_get_interfaces/missing_mtu/expected_result.json @@ -1,5 +1,5 @@ { - "Management0": { + "mgmt0": { "is_enabled": true, "description": "", "last_flapped": -1.0, @@ -26,7 +26,7 @@ "mtu": -1, "speed": 1000 }, - "Loopback0": { + "loopback0": { "is_enabled": true, "description": "", "last_flapped": -1.0, @@ -35,7 +35,7 @@ "mtu": 1500, "speed": 8000 }, - "Loopback55": { + "loopback55": { "is_enabled": true, "description": "", "last_flapped": -1.0, diff --git a/test/nxos_ssh/mocked_data/test_get_interfaces/normal/expected_result.json b/test/nxos_ssh/mocked_data/test_get_interfaces/normal/expected_result.json index 1560ba327..e145ea60f 100644 --- a/test/nxos_ssh/mocked_data/test_get_interfaces/normal/expected_result.json +++ b/test/nxos_ssh/mocked_data/test_get_interfaces/normal/expected_result.json @@ -1,5 +1,5 @@ { - "Management0": { + "mgmt0": { "is_enabled": true, "description": "", "last_flapped": -1.0, @@ -539,7 +539,7 @@ "mtu": 1500, "speed": 1000 }, - "Loopback55": { + "loopback55": { "is_enabled": true, "description": "", "last_flapped": -1.0, @@ -1322,7 +1322,7 @@ "mtu": 1500, "speed": 1000 }, - "Loopback0": { + "loopback0": { "is_enabled": true, "description": "", "last_flapped": -1.0,