From 7bb36f334a77750d3556773d6a2273b7f8616500 Mon Sep 17 00:00:00 2001 From: Clement Landier Date: Fri, 19 Dec 2025 22:04:27 +0100 Subject: [PATCH 1/3] Add cisco nxos show interface status err-disabled --- ..._show_interface_status_err-disabled.textfsm | 14 ++++++++++++++ ntc_templates/templates/index | 1 + ...nxos_show_interface_status_err-disabled.raw | 7 +++++++ ...nxos_show_interface_status_err-disabled.yml | 18 ++++++++++++++++++ 4 files changed, 40 insertions(+) create mode 100644 ntc_templates/templates/cisco_nxos_show_interface_status_err-disabled.textfsm create mode 100644 tests/cisco_nxos/show_interface_status_err-disabled/cisco_nxos_show_interface_status_err-disabled.raw create mode 100644 tests/cisco_nxos/show_interface_status_err-disabled/cisco_nxos_show_interface_status_err-disabled.yml diff --git a/ntc_templates/templates/cisco_nxos_show_interface_status_err-disabled.textfsm b/ntc_templates/templates/cisco_nxos_show_interface_status_err-disabled.textfsm new file mode 100644 index 0000000000..dcba4354a2 --- /dev/null +++ b/ntc_templates/templates/cisco_nxos_show_interface_status_err-disabled.textfsm @@ -0,0 +1,14 @@ +Value Required INTERFACE (\S+) +Value NAME (.*?) +Value Required STATUS (err-disabled|linkFlapErr) +Value PORT_ERROR (.*) + +Start + ^-+\s*$$ + ^\s*Port\s+Name\s+Status\s+Reason\s*$$ -> Interfaces + ^. -> Error + +Interfaces + ^\s*${INTERFACE}\s+${NAME}\s+${STATUS}\s+${PORT_ERROR} -> Record + ^-+\s*$$ + ^. -> Error diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 528ae4093d..3f89b5b5b6 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -412,6 +412,7 @@ cisco_nxos_show_ip_pim_interface_brief_vrf_all.textfsm, .*, cisco_nxos, sh[[ow]] cisco_nxos_show_nve_vni_interface_nve_1_detail.textfsm, .*, cisco_nxos, sh[[ow]] nv[[e]] vn[[i]] int[[erface]] nv[[e]] 1 det[[ail]] cisco_nxos_show_configuration_session_summary.textfsm, .*, cisco_nxos, sh[[ow]] configu[[ration]] s[[ession]] su[[mmary]] cisco_nxos_show_interface_transceiver_details.textfsm, .*, cisco_nxos, sh[[ow]] int[[erface]] tra[[nsceiver]] de[[tails]] +cisco_nxos_show_interface_status_err-disabled.textfsm, .*, cisco_nxos, sh[[ow]] int[[erface]] st[[atus]] err-d[[isabled]] cisco_nxos_show_ip_dhcp_snooping_statistics.textfsm, .*, cisco_nxos, sh[[ow]] ip dh[[cp]] sn[[ooping]] st[[atistics]] cisco_nxos_show_ip_pim_group-range_vrf_all.textfsm, .*, cisco_nxos, sh[[ow]] ip pim group[[-range]] vrf all cisco_nxos_show_environment_temperature.textfsm, .*, cisco_nxos, sh[[ow]] env[[ironment]] t[[emperature]] diff --git a/tests/cisco_nxos/show_interface_status_err-disabled/cisco_nxos_show_interface_status_err-disabled.raw b/tests/cisco_nxos/show_interface_status_err-disabled/cisco_nxos_show_interface_status_err-disabled.raw new file mode 100644 index 0000000000..f98d2f4f5a --- /dev/null +++ b/tests/cisco_nxos/show_interface_status_err-disabled/cisco_nxos_show_interface_status_err-disabled.raw @@ -0,0 +1,7 @@ +-------------------------------------------------------------------------------- +Port Name Status Reason +-------------------------------------------------------------------------------- +Eth1 tenGigE 0/0/2/0 as linkFlapErr linkFlapErrDisabled +Eth2 -- linkFlapErr linkFlapErrDisabled +Eth3 -- err-disabled Error disabled +Eth4 SD 180848 OFFER EM linkFlapErr linkFlapErrDisabled diff --git a/tests/cisco_nxos/show_interface_status_err-disabled/cisco_nxos_show_interface_status_err-disabled.yml b/tests/cisco_nxos/show_interface_status_err-disabled/cisco_nxos_show_interface_status_err-disabled.yml new file mode 100644 index 0000000000..9efb40fc7c --- /dev/null +++ b/tests/cisco_nxos/show_interface_status_err-disabled/cisco_nxos_show_interface_status_err-disabled.yml @@ -0,0 +1,18 @@ +--- +parsed_sample: + - interface: "Eth1" + name: "tenGigE 0/0/2/0 as" + port_error: "linkFlapErrDisabled" + status: "linkFlapErr" + - interface: "Eth2" + name: "--" + port_error: "linkFlapErrDisabled" + status: "linkFlapErr" + - interface: "Eth3" + name: "--" + port_error: "Error disabled" + status: "err-disabled" + - interface: "Eth4" + name: "SD 180848 OFFER EM" + port_error: "linkFlapErrDisabled" + status: "linkFlapErr" From 56e7fe8d316ce7b6a7f97ed56a23a60e6d8cdc84 Mon Sep 17 00:00:00 2001 From: Michael Bear <38406045+mjbear@users.noreply.github.com> Date: Tue, 23 Dec 2025 11:07:09 -0500 Subject: [PATCH 2/3] Simplify nxos status err-disabled template Simplify states and reduce duplicate lines --- .../cisco_nxos_show_interface_status_err-disabled.textfsm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ntc_templates/templates/cisco_nxos_show_interface_status_err-disabled.textfsm b/ntc_templates/templates/cisco_nxos_show_interface_status_err-disabled.textfsm index dcba4354a2..5d6a87dce1 100644 --- a/ntc_templates/templates/cisco_nxos_show_interface_status_err-disabled.textfsm +++ b/ntc_templates/templates/cisco_nxos_show_interface_status_err-disabled.textfsm @@ -5,10 +5,6 @@ Value PORT_ERROR (.*) Start ^-+\s*$$ - ^\s*Port\s+Name\s+Status\s+Reason\s*$$ -> Interfaces - ^. -> Error - -Interfaces + ^\s*Port\s+Name\s+Status\s+Reason\s*$$ ^\s*${INTERFACE}\s+${NAME}\s+${STATUS}\s+${PORT_ERROR} -> Record - ^-+\s*$$ ^. -> Error From f7460452ae45ae012b85519743ad442c1de90d8b Mon Sep 17 00:00:00 2001 From: Michael Bear <38406045+mjbear@users.noreply.github.com> Date: Tue, 23 Dec 2025 11:23:52 -0500 Subject: [PATCH 3/3] Fix nxos int status err-disabled index order --- ntc_templates/templates/index | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 3f89b5b5b6..989293adc6 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -411,8 +411,8 @@ cisco_nxos_show_bgp_vrf_all_ipv4_unicast_detail.textfsm, .*, cisco_nxos, sh[[ow] cisco_nxos_show_ip_pim_interface_brief_vrf_all.textfsm, .*, cisco_nxos, sh[[ow]] ip pim int[[erface]] br[[ief]] vrf all cisco_nxos_show_nve_vni_interface_nve_1_detail.textfsm, .*, cisco_nxos, sh[[ow]] nv[[e]] vn[[i]] int[[erface]] nv[[e]] 1 det[[ail]] cisco_nxos_show_configuration_session_summary.textfsm, .*, cisco_nxos, sh[[ow]] configu[[ration]] s[[ession]] su[[mmary]] -cisco_nxos_show_interface_transceiver_details.textfsm, .*, cisco_nxos, sh[[ow]] int[[erface]] tra[[nsceiver]] de[[tails]] cisco_nxos_show_interface_status_err-disabled.textfsm, .*, cisco_nxos, sh[[ow]] int[[erface]] st[[atus]] err-d[[isabled]] +cisco_nxos_show_interface_transceiver_details.textfsm, .*, cisco_nxos, sh[[ow]] int[[erface]] tra[[nsceiver]] de[[tails]] cisco_nxos_show_ip_dhcp_snooping_statistics.textfsm, .*, cisco_nxos, sh[[ow]] ip dh[[cp]] sn[[ooping]] st[[atistics]] cisco_nxos_show_ip_pim_group-range_vrf_all.textfsm, .*, cisco_nxos, sh[[ow]] ip pim group[[-range]] vrf all cisco_nxos_show_environment_temperature.textfsm, .*, cisco_nxos, sh[[ow]] env[[ironment]] t[[emperature]]