From 289ece8aa4dd043e31afebd6e73315380009a914 Mon Sep 17 00:00:00 2001 From: Ryan Harden Date: Mon, 8 Jul 2019 11:06:23 -0500 Subject: [PATCH 1/6] add cisco_wlc_ssh_show_exclusionlist --- templates/cisco_wlc_ssh_show_exclusionlist.template | 5 +++++ templates/index | 1 + .../cisco_wlc_ssh_show_exclusionlist.parsed | 10 ++++++++++ .../cisco_wlc_ssh_show_exclusionlist.raw | 11 +++++++++++ 4 files changed, 27 insertions(+) create mode 100644 templates/cisco_wlc_ssh_show_exclusionlist.template create mode 100644 tests/cisco_wlc_ssh/show_exclusionlist/cisco_wlc_ssh_show_exclusionlist.parsed create mode 100644 tests/cisco_wlc_ssh/show_exclusionlist/cisco_wlc_ssh_show_exclusionlist.raw diff --git a/templates/cisco_wlc_ssh_show_exclusionlist.template b/templates/cisco_wlc_ssh_show_exclusionlist.template new file mode 100644 index 0000000000..09540a6607 --- /dev/null +++ b/templates/cisco_wlc_ssh_show_exclusionlist.template @@ -0,0 +1,5 @@ +Value mac (([\da-fA-F]{2}[-:]){5}[\da-fA-F]{2}) +Value comment (.*) + +Start + ^${mac}\s+${comment} -> Record \ No newline at end of file diff --git a/templates/index b/templates/index index a2b4bbc876..76f259f89b 100644 --- a/templates/index +++ b/templates/index @@ -233,6 +233,7 @@ cisco_wlc_ssh_show_cdp_neighbors_detail.template, .*, cisco_wlc_ssh, sh[[ow]] c[ cisco_wlc_ssh_show_ap_config_general.template, .*, cisco_wlc_ssh, sh[[ow]] ap con[[fig]] ge[[neral]] cisco_wlc_ssh_show_ap_summary.template, .*, cisco_wlc_ssh, sh[[ow]] ap sum[[mary]] cisco_wlc_ssh_show_sysinfo.template, .*, cisco_wlc_ssh, sh[[ow]] sysi[[nfo]] +cisco_wlc_ssh_show_exclusionlist.template, .*, cisco_wlc_ssh, sh[[ow]] ex[[clusionlist]] cisco_xr_show_controllers_fabric_fia_errors_ingress_location.template, .*, cisco_xr, sh[[ow]] contr[[ollers]] fabric fi[[a]] err[[ors]] in[[gress]] loc[[ation]] cisco_xr_show_controllers_fabric_fia_drops_ingress_location.template, .*, cisco_xr, sh[[ow]] contr[[ollers]] fabric fi[[a]] dr[[ops]] in[[gress]] loc[[ation]] diff --git a/tests/cisco_wlc_ssh/show_exclusionlist/cisco_wlc_ssh_show_exclusionlist.parsed b/tests/cisco_wlc_ssh/show_exclusionlist/cisco_wlc_ssh_show_exclusionlist.parsed new file mode 100644 index 0000000000..7949759520 --- /dev/null +++ b/tests/cisco_wlc_ssh/show_exclusionlist/cisco_wlc_ssh_show_exclusionlist.parsed @@ -0,0 +1,10 @@ +--- +parsed_sample: +- mac: aa:bb:cc:dd:ee:ff + comment: "bad-guy" +- mac: 00:22:43:cc:ac:2d + comment: "request #6aa493" +- mac: 34:f6:aa:7e:70:3e + comment: "ticket #612333" +- mac: 40:b0:34:99:95:d9 + comment: "Unkown Device" \ No newline at end of file diff --git a/tests/cisco_wlc_ssh/show_exclusionlist/cisco_wlc_ssh_show_exclusionlist.raw b/tests/cisco_wlc_ssh/show_exclusionlist/cisco_wlc_ssh_show_exclusionlist.raw new file mode 100644 index 0000000000..dcde3e614f --- /dev/null +++ b/tests/cisco_wlc_ssh/show_exclusionlist/cisco_wlc_ssh_show_exclusionlist.raw @@ -0,0 +1,11 @@ +Manually Disabled Clients +------------------------- +MAC Address Description +----------------------- -------------------------------- +aa:bb:cc:dd:ee:ff bad-guy +00:22:43:cc:ac:2d request #6aa493 +34:f6:aa:7e:70:3e ticket #612333 +40:b0:34:99:95:d9 Unkown Device + + +No dynamically excluded clients. \ No newline at end of file From 3e96da5786a2285bbf0a44ac13b8e491d1fd1282 Mon Sep 17 00:00:00 2001 From: Ryan Harden Date: Mon, 8 Jul 2019 11:37:09 -0500 Subject: [PATCH 2/6] fix index ordering --- templates/index | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/index b/templates/index index 76f259f89b..3060939a8a 100644 --- a/templates/index +++ b/templates/index @@ -231,9 +231,10 @@ cisco_nxos_show_vrf.template, .*, cisco_nxos, sh[[ow]] vrf cisco_wlc_ssh_show_cdp_neighbors_detail.template, .*, cisco_wlc_ssh, sh[[ow]] c[[dp]] neig[[hbors]] det[[ail]] cisco_wlc_ssh_show_ap_config_general.template, .*, cisco_wlc_ssh, sh[[ow]] ap con[[fig]] ge[[neral]] +cisco_wlc_ssh_show_exclusionlist.template, .*, cisco_wlc_ssh, sh[[ow]] ex[[clusionlist]] cisco_wlc_ssh_show_ap_summary.template, .*, cisco_wlc_ssh, sh[[ow]] ap sum[[mary]] cisco_wlc_ssh_show_sysinfo.template, .*, cisco_wlc_ssh, sh[[ow]] sysi[[nfo]] -cisco_wlc_ssh_show_exclusionlist.template, .*, cisco_wlc_ssh, sh[[ow]] ex[[clusionlist]] + cisco_xr_show_controllers_fabric_fia_errors_ingress_location.template, .*, cisco_xr, sh[[ow]] contr[[ollers]] fabric fi[[a]] err[[ors]] in[[gress]] loc[[ation]] cisco_xr_show_controllers_fabric_fia_drops_ingress_location.template, .*, cisco_xr, sh[[ow]] contr[[ollers]] fabric fi[[a]] dr[[ops]] in[[gress]] loc[[ation]] From ebfcca54e6702d989d300cd38c0cc62ea01679d9 Mon Sep 17 00:00:00 2001 From: Ryan Harden Date: Thu, 8 Aug 2019 08:50:21 -0500 Subject: [PATCH 3/6] update to add new catch-all --- templates/cisco_wlc_ssh_show_exclusionlist.template | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/cisco_wlc_ssh_show_exclusionlist.template b/templates/cisco_wlc_ssh_show_exclusionlist.template index 09540a6607..9547eb145b 100644 --- a/templates/cisco_wlc_ssh_show_exclusionlist.template +++ b/templates/cisco_wlc_ssh_show_exclusionlist.template @@ -2,4 +2,6 @@ Value mac (([\da-fA-F]{2}[-:]){5}[\da-fA-F]{2}) Value comment (.*) Start - ^${mac}\s+${comment} -> Record \ No newline at end of file + ^${mac}\s+${comment} -> Record + ^\s*$$ + ^. -> Error From eb8504d90f29021273a064d29a285d8ba05f2a57 Mon Sep 17 00:00:00 2001 From: Ryan Harden Date: Thu, 8 Aug 2019 09:22:53 -0500 Subject: [PATCH 4/6] fix up template catch-all --- templates/cisco_wlc_ssh_show_exclusionlist.template | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/cisco_wlc_ssh_show_exclusionlist.template b/templates/cisco_wlc_ssh_show_exclusionlist.template index 9547eb145b..c74d1f1152 100644 --- a/templates/cisco_wlc_ssh_show_exclusionlist.template +++ b/templates/cisco_wlc_ssh_show_exclusionlist.template @@ -3,5 +3,6 @@ Value comment (.*) Start ^${mac}\s+${comment} -> Record - ^\s*$$ + ^([A-Za-z]+\s)+ + ^-+ ^. -> Error From b050e6d85466ee3e6ca172482078e1e1c92f11b9 Mon Sep 17 00:00:00 2001 From: Ryan Harden Date: Fri, 27 Sep 2019 11:32:35 -0500 Subject: [PATCH 5/6] fix up template catch-all, adjusted variable case --- .../cisco_wlc_ssh_show_exclusionlist.template | 13 ++++++++----- .../cisco_wlc_ssh_show_exclusionlist.parsed | 16 ++++++++-------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/templates/cisco_wlc_ssh_show_exclusionlist.template b/templates/cisco_wlc_ssh_show_exclusionlist.template index c74d1f1152..24cc53e186 100644 --- a/templates/cisco_wlc_ssh_show_exclusionlist.template +++ b/templates/cisco_wlc_ssh_show_exclusionlist.template @@ -1,8 +1,11 @@ -Value mac (([\da-fA-F]{2}[-:]){5}[\da-fA-F]{2}) -Value comment (.*) +Value MAC (([\da-fA-F]{2}[-:]){5}[\da-fA-F]{2}) +Value COMMENT (.*) Start - ^${mac}\s+${comment} -> Record - ^([A-Za-z]+\s)+ - ^-+ + ^MAC\s+Address\s+Description -> ManuallyDisabled + +ManuallyDisabled + ^${MAC}\s+${COMMENT} -> Record + ^No\s*dynamically + ^\s*$$ ^. -> Error diff --git a/tests/cisco_wlc_ssh/show_exclusionlist/cisco_wlc_ssh_show_exclusionlist.parsed b/tests/cisco_wlc_ssh/show_exclusionlist/cisco_wlc_ssh_show_exclusionlist.parsed index 7949759520..8a02257aeb 100644 --- a/tests/cisco_wlc_ssh/show_exclusionlist/cisco_wlc_ssh_show_exclusionlist.parsed +++ b/tests/cisco_wlc_ssh/show_exclusionlist/cisco_wlc_ssh_show_exclusionlist.parsed @@ -1,10 +1,10 @@ --- parsed_sample: -- mac: aa:bb:cc:dd:ee:ff - comment: "bad-guy" -- mac: 00:22:43:cc:ac:2d - comment: "request #6aa493" -- mac: 34:f6:aa:7e:70:3e - comment: "ticket #612333" -- mac: 40:b0:34:99:95:d9 - comment: "Unkown Device" \ No newline at end of file +- MAC: aa:bb:cc:dd:ee:ff + COMMENT: "bad-guy" +- MAC: 00:22:43:cc:ac:2d + COMMENT: "request #6aa493" +- MAC: 34:f6:aa:7e:70:3e + COMMENT: "ticket #612333" +- MAC: 40:b0:34:99:95:d9 + COMMENT: "Unkown Device" \ No newline at end of file From bc8c3eb621fef80e9eeb020d4824c0242de28331 Mon Sep 17 00:00:00 2001 From: Ryan Harden Date: Fri, 27 Sep 2019 12:00:04 -0500 Subject: [PATCH 6/6] added suggestions, fixed .parsed file --- .../cisco_wlc_ssh_show_exclusionlist.template | 11 +++++++---- .../cisco_wlc_ssh_show_exclusionlist.parsed | 16 ++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/templates/cisco_wlc_ssh_show_exclusionlist.template b/templates/cisco_wlc_ssh_show_exclusionlist.template index 24cc53e186..30662315a5 100644 --- a/templates/cisco_wlc_ssh_show_exclusionlist.template +++ b/templates/cisco_wlc_ssh_show_exclusionlist.template @@ -2,10 +2,13 @@ Value MAC (([\da-fA-F]{2}[-:]){5}[\da-fA-F]{2}) Value COMMENT (.*) Start - ^MAC\s+Address\s+Description -> ManuallyDisabled - -ManuallyDisabled - ^${MAC}\s+${COMMENT} -> Record + ^Manually\s*Disabled\s*Clients -> ManuallyDisabled ^No\s*dynamically ^\s*$$ ^. -> Error + +ManuallyDisabled + ^--- + ^MAC\s+Address\s+Description + ^${MAC}\s+${COMMENT} -> Record + ^\s*$$ -> Start \ No newline at end of file diff --git a/tests/cisco_wlc_ssh/show_exclusionlist/cisco_wlc_ssh_show_exclusionlist.parsed b/tests/cisco_wlc_ssh/show_exclusionlist/cisco_wlc_ssh_show_exclusionlist.parsed index 8a02257aeb..7949759520 100644 --- a/tests/cisco_wlc_ssh/show_exclusionlist/cisco_wlc_ssh_show_exclusionlist.parsed +++ b/tests/cisco_wlc_ssh/show_exclusionlist/cisco_wlc_ssh_show_exclusionlist.parsed @@ -1,10 +1,10 @@ --- parsed_sample: -- MAC: aa:bb:cc:dd:ee:ff - COMMENT: "bad-guy" -- MAC: 00:22:43:cc:ac:2d - COMMENT: "request #6aa493" -- MAC: 34:f6:aa:7e:70:3e - COMMENT: "ticket #612333" -- MAC: 40:b0:34:99:95:d9 - COMMENT: "Unkown Device" \ No newline at end of file +- mac: aa:bb:cc:dd:ee:ff + comment: "bad-guy" +- mac: 00:22:43:cc:ac:2d + comment: "request #6aa493" +- mac: 34:f6:aa:7e:70:3e + comment: "ticket #612333" +- mac: 40:b0:34:99:95:d9 + comment: "Unkown Device" \ No newline at end of file