From 76f94993767d7551d16285a4323c3b67c2db80ad Mon Sep 17 00:00:00 2001 From: Michael Bear <38406045+mjbear@users.noreply.github.com> Date: Mon, 21 Dec 2020 17:52:03 -0500 Subject: [PATCH] New Template: cisco_wlc_show_mobility_anchor --- ...cisco_wlc_ssh_show_mobility_anchor.textfsm | 19 ++++++++++++++++ templates/index | 1 + .../cisco_wlc_ssh_show_mobility_anchor.raw | 16 ++++++++++++++ .../cisco_wlc_ssh_show_mobility_anchor.yml | 22 +++++++++++++++++++ 4 files changed, 58 insertions(+) create mode 100644 templates/cisco_wlc_ssh_show_mobility_anchor.textfsm create mode 100644 tests/cisco_wlc_ssh/show_mobility_anchor/cisco_wlc_ssh_show_mobility_anchor.raw create mode 100644 tests/cisco_wlc_ssh/show_mobility_anchor/cisco_wlc_ssh_show_mobility_anchor.yml diff --git a/templates/cisco_wlc_ssh_show_mobility_anchor.textfsm b/templates/cisco_wlc_ssh_show_mobility_anchor.textfsm new file mode 100644 index 0000000000..6c92cdd39e --- /dev/null +++ b/templates/cisco_wlc_ssh_show_mobility_anchor.textfsm @@ -0,0 +1,19 @@ +Value WLAN_ID (\d+) +Value IPADDR (\S+) +Value STATUS (\S+) +Value PRIORITY ([1-3]) + +Start + ^\s*WLAN ID\s+IP Address\s+Status\s+Priority\s*$$ -> Mobility_Anchor + +Mobility_Anchor + # WLAN Mobility Anchor List + ^\s+${WLAN_ID}\s+${IPADDR}\s+${STATUS}\s+${PRIORITY} -> Record + # + # also handling the similar Guest LAN (GLAN) output + ^\s+${WLAN_ID}\s+${IPADDR}\s+${STATUS} -> Record + # + ^\s*GLAN ID\s+IP Address\s+Status\s*$$ + ^\s+[-\s]+$$ + ^\s*$$ + ^. -> Error diff --git a/templates/index b/templates/index index 4b48563c71..920cc47018 100644 --- a/templates/index +++ b/templates/index @@ -314,6 +314,7 @@ cisco_wlc_ssh_show_rf-profile_summary.textfsm, .*, cisco_wlc_ssh, sh[[ow]] rf-[[ cisco_wlc_ssh_show_ap_config_general.textfsm, .*, cisco_wlc_ssh, sh[[ow]] ap con[[fig]] ge[[neral]] cisco_wlc_ssh_show_interface_summary.textfsm, .*, cisco_wlc_ssh, sh[[ow]] int[[erface]] s[[ummary]] cisco_wlc_ssh_show_redundancy_detail.textfsm, .*, cisco_wlc_ssh, sh[[ow]] red[[undancy]] d[[etail]] +cisco_wlc_ssh_show_mobility_anchor.textfsm, .*, cisco_wlc_ssh, sh[[ow]] mo[[bility]] an[[chor]] cisco_wlc_ssh_show_client_detail.textfsm, .*, cisco_wlc_ssh, sh[[ow]] cl[[ient]] det[[ail]] cisco_wlc_ssh_show_exclusionlist.textfsm, .*, cisco_wlc_ssh, sh[[ow]] ex[[clusionlist]] cisco_wlc_ssh_show_ap_image_all.textfsm, .*, cisco_wlc_ssh, sh[[ow]] ap ima[[ge]] a[[ll]] diff --git a/tests/cisco_wlc_ssh/show_mobility_anchor/cisco_wlc_ssh_show_mobility_anchor.raw b/tests/cisco_wlc_ssh/show_mobility_anchor/cisco_wlc_ssh_show_mobility_anchor.raw new file mode 100644 index 0000000000..fb158357b3 --- /dev/null +++ b/tests/cisco_wlc_ssh/show_mobility_anchor/cisco_wlc_ssh_show_mobility_anchor.raw @@ -0,0 +1,16 @@ + +Mobility Anchor Export List + + + Priority number, 1=Highest priority and 3=Lowest priority(default). + + WLAN ID IP Address Status Priority + ------- --------------- ------ -------- + 12 10.0.0.211 Up 3 + 12 10.0.0.212 Up 2 + 13 10.0.0.212 Up 2 + 13 10.0.0.213 Up 1 + + GLAN ID IP Address Status + ------- --------------- ------ + 99 192.168.180.1 Down diff --git a/tests/cisco_wlc_ssh/show_mobility_anchor/cisco_wlc_ssh_show_mobility_anchor.yml b/tests/cisco_wlc_ssh/show_mobility_anchor/cisco_wlc_ssh_show_mobility_anchor.yml new file mode 100644 index 0000000000..c7c15c3af0 --- /dev/null +++ b/tests/cisco_wlc_ssh/show_mobility_anchor/cisco_wlc_ssh_show_mobility_anchor.yml @@ -0,0 +1,22 @@ +--- +parsed_sample: + - wlan_id: "12" + ipaddr: "10.0.0.211" + status: "Up" + priority: "3" + - wlan_id: "12" + ipaddr: "10.0.0.212" + status: "Up" + priority: "2" + - wlan_id: "13" + ipaddr: "10.0.0.212" + status: "Up" + priority: "2" + - wlan_id: "13" + ipaddr: "10.0.0.213" + status: "Up" + priority: "1" + - wlan_id: "99" + ipaddr: "192.168.180.1" + status: "Down" + priority: ""