diff --git a/ntc_templates/templates/cisco_nxos_show_switching-mode.textfsm b/ntc_templates/templates/cisco_nxos_show_switching-mode.textfsm new file mode 100644 index 0000000000..85eaa4ff39 --- /dev/null +++ b/ntc_templates/templates/cisco_nxos_show_switching-mode.textfsm @@ -0,0 +1,10 @@ +Value Filldown CONFIGURED_SWITCHING_MODE ([\S\s]+?) +Value Required MODULE_NUMBER (\S+) +Value Required OPERATIONAL_MODE ([\S\s]+?) + +Start + ^\s*Configured\s*switching\s*mode:\s*${CONFIGURED_SWITCHING_MODE}\s*$$ + ^\s*Module\s*Number\s*Operational\s*Mode\s*$$ + ^\s*${MODULE_NUMBER}\s*${OPERATIONAL_MODE}\s*$$ -> Record + ^\s*$$ + ^. -> Error \ No newline at end of file diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index e11789967c..f67ffd9225 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -353,6 +353,7 @@ cisco_nxos_show_interface_brief.textfsm, .*, cisco_nxos, sh[[ow]] int[[erface]] cisco_nxos_show_flogi_database.textfsm, .*, cisco_nxos, sh[[ow]] fl[[ogi]] d[[atabase]] cisco_nxos_show_ip_bgp_summary.textfsm, .*, cisco_nxos, sh[[ow]] ip b[[gp]] s[[ummary]] cisco_nxos_show_lldp_neighbors.textfsm, .*, cisco_nxos, sh[[ow]] ll[[dp]] nei[[ghbors]] +cisco_nxos_show_switching-mode.textfsm, .*, cisco_nxos, sh[[ow]] switchi[[ng-mode]] cisco_nxos_show_cdp_neighbors.textfsm, .*, cisco_nxos, sh[[ow]] cd[[p]] neig[[hbors]] cisco_nxos_show_ip_arp_detail.textfsm, .*, cisco_nxos, sh[[ow]] i[[p]] a[[rp]] det[[ail]] cisco_nxos_show_license_usage.textfsm, .*, cisco_nxos, sh[[ow]] lic[[ense]] us[[age]] diff --git a/tests/cisco_nxos/show_switching-mode/cisco_nxos_show_switching-mode_1.raw b/tests/cisco_nxos/show_switching-mode/cisco_nxos_show_switching-mode_1.raw new file mode 100644 index 0000000000..e2add65543 --- /dev/null +++ b/tests/cisco_nxos/show_switching-mode/cisco_nxos_show_switching-mode_1.raw @@ -0,0 +1,4 @@ +Configured switching mode: Cut through + +Module Number Operational Mode + 1 Cut-Through \ No newline at end of file diff --git a/tests/cisco_nxos/show_switching-mode/cisco_nxos_show_switching-mode_1.yml b/tests/cisco_nxos/show_switching-mode/cisco_nxos_show_switching-mode_1.yml new file mode 100644 index 0000000000..9a27ebbbe5 --- /dev/null +++ b/tests/cisco_nxos/show_switching-mode/cisco_nxos_show_switching-mode_1.yml @@ -0,0 +1,5 @@ +--- +parsed_sample: + - configured_switching_mode: "Cut through" + module_number: "1" + operational_mode: "Cut-Through" diff --git a/tests/cisco_nxos/show_switching-mode/cisco_nxos_show_switching-mode_2.raw b/tests/cisco_nxos/show_switching-mode/cisco_nxos_show_switching-mode_2.raw new file mode 100644 index 0000000000..d0f2a1e202 --- /dev/null +++ b/tests/cisco_nxos/show_switching-mode/cisco_nxos_show_switching-mode_2.raw @@ -0,0 +1,4 @@ +Configured switching mode: Store and Forward + +Module Number Operational Mode + 1 Store and Forward \ No newline at end of file diff --git a/tests/cisco_nxos/show_switching-mode/cisco_nxos_show_switching-mode_2.yml b/tests/cisco_nxos/show_switching-mode/cisco_nxos_show_switching-mode_2.yml new file mode 100644 index 0000000000..5f6ce665f2 --- /dev/null +++ b/tests/cisco_nxos/show_switching-mode/cisco_nxos_show_switching-mode_2.yml @@ -0,0 +1,5 @@ +--- +parsed_sample: + - configured_switching_mode: "Store and Forward" + module_number: "1" + operational_mode: "Store and Forward" diff --git a/tests/cisco_nxos/show_switching-mode/cisco_nxos_show_switching-mode_3.raw b/tests/cisco_nxos/show_switching-mode/cisco_nxos_show_switching-mode_3.raw new file mode 100644 index 0000000000..5dde92d6fc --- /dev/null +++ b/tests/cisco_nxos/show_switching-mode/cisco_nxos_show_switching-mode_3.raw @@ -0,0 +1,5 @@ +Configured switching mode: Store and Forward + +Module Number Operational Mode + 1 Store and Forward + 2 Cut-Through \ No newline at end of file diff --git a/tests/cisco_nxos/show_switching-mode/cisco_nxos_show_switching-mode_3.yml b/tests/cisco_nxos/show_switching-mode/cisco_nxos_show_switching-mode_3.yml new file mode 100644 index 0000000000..6a07be25cb --- /dev/null +++ b/tests/cisco_nxos/show_switching-mode/cisco_nxos_show_switching-mode_3.yml @@ -0,0 +1,8 @@ +--- +parsed_sample: + - configured_switching_mode: "Store and Forward" + module_number: "1" + operational_mode: "Store and Forward" + - configured_switching_mode: "Store and Forward" + module_number: "2" + operational_mode: "Cut-Through"