From c0bb157bf53ed0baa186d1fa74561567174dd9fa Mon Sep 17 00:00:00 2001 From: wvandeun <7521270+wvandeun@users.noreply.github.com> Date: Thu, 8 Oct 2020 02:48:21 +0200 Subject: [PATCH] Bugfix: cisco_wlc_ssh_show_interface_summary - Allow space or no space on Number of Interfaces line (#810) --- ...sco_wlc_ssh_show_interface_summary.textfsm | 2 +- .../cisco_wlc_ssh_show_interface_summary2.raw | 10 +++++++ .../cisco_wlc_ssh_show_interface_summary2.yml | 26 +++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 tests/cisco_wlc_ssh/show_interface_summary/cisco_wlc_ssh_show_interface_summary2.raw create mode 100644 tests/cisco_wlc_ssh/show_interface_summary/cisco_wlc_ssh_show_interface_summary2.yml diff --git a/templates/cisco_wlc_ssh_show_interface_summary.textfsm b/templates/cisco_wlc_ssh_show_interface_summary.textfsm index def2fddefd..912446f4e4 100644 --- a/templates/cisco_wlc_ssh_show_interface_summary.textfsm +++ b/templates/cisco_wlc_ssh_show_interface_summary.textfsm @@ -8,7 +8,7 @@ Value AP_MGR (\S+) Value GUEST (\S+) Start - ^\s+Number\sof\sInterfaces\.*\s${INT_COUNT}s*$$ + ^\s*Number\sof\sInterfaces\.*\s${INT_COUNT}s*$$ ^Interface\s+Name\s+Port\s+Vlan\s+Id\s+IP\s+Address\s+Type\s+Ap\s+Mgr\s+Guest -> Type_One ^\s*$$ ^. -> Error diff --git a/tests/cisco_wlc_ssh/show_interface_summary/cisco_wlc_ssh_show_interface_summary2.raw b/tests/cisco_wlc_ssh/show_interface_summary/cisco_wlc_ssh_show_interface_summary2.raw new file mode 100644 index 0000000000..faf9bc80b0 --- /dev/null +++ b/tests/cisco_wlc_ssh/show_interface_summary/cisco_wlc_ssh_show_interface_summary2.raw @@ -0,0 +1,10 @@ + + + +Number of Interfaces.......................... 3 + +Interface Name Port Vlan Id IP Address Type Ap Mgr Guest +-------------------------------- ---- -------- --------------- ------- ------ ----- +management 1 untagged 192.168.1.11 Static Yes N/A +service-port N/A N/A 11.1.1.1 Static No N/A +virtual N/A N/A 1.1.1.1 Static No N/A diff --git a/tests/cisco_wlc_ssh/show_interface_summary/cisco_wlc_ssh_show_interface_summary2.yml b/tests/cisco_wlc_ssh/show_interface_summary/cisco_wlc_ssh_show_interface_summary2.yml new file mode 100644 index 0000000000..fb4ed33279 --- /dev/null +++ b/tests/cisco_wlc_ssh/show_interface_summary/cisco_wlc_ssh_show_interface_summary2.yml @@ -0,0 +1,26 @@ +--- +parsed_sample: + - ap_mgr: "Yes" + guest: "N/A" + int_count: "3" + ip_addr: "192.168.1.11" + name: "management" + port: "1" + type: "Static" + vlan: "untagged" + - ap_mgr: "No" + guest: "N/A" + int_count: "3" + ip_addr: "11.1.1.1" + name: "service-port" + port: "N/A" + type: "Static" + vlan: "N/A" + - ap_mgr: "No" + guest: "N/A" + int_count: "3" + ip_addr: "1.1.1.1" + name: "virtual" + port: "N/A" + type: "Static" + vlan: "N/A"