From af7cf3f4be2f39831b7709b7f88ab05511bfa318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Skov=20Eriksen?= Date: Wed, 3 Mar 2021 13:39:15 +0100 Subject: [PATCH 1/5] Create dell_force10_show_ip_interface_brief.textfsm --- templates/dell_force10_show_ip_interface_brief.textfsm | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 templates/dell_force10_show_ip_interface_brief.textfsm diff --git a/templates/dell_force10_show_ip_interface_brief.textfsm b/templates/dell_force10_show_ip_interface_brief.textfsm new file mode 100644 index 0000000000..239841a6fa --- /dev/null +++ b/templates/dell_force10_show_ip_interface_brief.textfsm @@ -0,0 +1,9 @@ +Value INTERFACE (\S+ \S+) +Value IP (\S+) +Value OK (YES|NO) +Value Method (None|Manual) +Value Status (up|down) +Value Protocol (up|down) + +Start + ^${INTERFACE}\s+${IP}\s+${OK}\s+${Method}\s+${Status}\s+${Protocol} -> Record From 8b51f4c55d74f0f89dd6ea363fe233984a57b895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Skov=20Eriksen?= Date: Wed, 3 Mar 2021 13:43:36 +0100 Subject: [PATCH 2/5] Update dell_force10_show_ip_interface_brief.textfsm --- templates/dell_force10_show_ip_interface_brief.textfsm | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/dell_force10_show_ip_interface_brief.textfsm b/templates/dell_force10_show_ip_interface_brief.textfsm index 239841a6fa..69eacda2bd 100644 --- a/templates/dell_force10_show_ip_interface_brief.textfsm +++ b/templates/dell_force10_show_ip_interface_brief.textfsm @@ -7,3 +7,4 @@ Value Protocol (up|down) Start ^${INTERFACE}\s+${IP}\s+${OK}\s+${Method}\s+${Status}\s+${Protocol} -> Record + ^. -> Error From b36e12a87b8d4bb36c4dcea85d3848262afe6d9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Skov=20Eriksen?= Date: Wed, 3 Mar 2021 13:50:28 +0100 Subject: [PATCH 3/5] Update dell_force10_show_ip_interface_brief.textfsm --- templates/dell_force10_show_ip_interface_brief.textfsm | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/dell_force10_show_ip_interface_brief.textfsm b/templates/dell_force10_show_ip_interface_brief.textfsm index 69eacda2bd..239841a6fa 100644 --- a/templates/dell_force10_show_ip_interface_brief.textfsm +++ b/templates/dell_force10_show_ip_interface_brief.textfsm @@ -7,4 +7,3 @@ Value Protocol (up|down) Start ^${INTERFACE}\s+${IP}\s+${OK}\s+${Method}\s+${Status}\s+${Protocol} -> Record - ^. -> Error From e6eea9b72546c5ab6186cf2feadd7d98be5fc102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Eriksen?= Date: Thu, 18 Mar 2021 09:48:52 +0100 Subject: [PATCH 4/5] compy with changes requesteed --- .../dell_force10_show_ip_interface_brief.textfsm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/dell_force10_show_ip_interface_brief.textfsm b/templates/dell_force10_show_ip_interface_brief.textfsm index 239841a6fa..72c3cde7ec 100644 --- a/templates/dell_force10_show_ip_interface_brief.textfsm +++ b/templates/dell_force10_show_ip_interface_brief.textfsm @@ -1,9 +1,9 @@ -Value INTERFACE (\S+ \S+) -Value IP (\S+) +Value INTF(\S+ \S+) +Value IPADDR (\S+) Value OK (YES|NO) -Value Method (None|Manual) -Value Status (up|down) -Value Protocol (up|down) +Value METHOD (None|Manual) +Value STATUS (up|down) +Value PROTO (up|down) Start - ^${INTERFACE}\s+${IP}\s+${OK}\s+${Method}\s+${Status}\s+${Protocol} -> Record + ^${INTF}\s+${IPADDR}\s+${OK}\s+${METHOD}\s+${STATUS}\s+${PROTO} -> Record From 45a339751b571edf7723f4075372560a3859195d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Eriksen?= Date: Wed, 24 Mar 2021 10:02:34 +0100 Subject: [PATCH 5/5] Add tests and cleanup --- ...ll_force10_show_ip_interface_brief.textfsm | 2 +- templates/index | 1 + .../dell_force10_show_ip_interface_brief.raw | 55 +++ .../dell_force10_show_ip_interface_brief.yml | 326 ++++++++++++++++++ 4 files changed, 383 insertions(+), 1 deletion(-) create mode 100644 tests/dell_force10/show_ip_interface_brief/dell_force10_show_ip_interface_brief.raw create mode 100644 tests/dell_force10/show_ip_interface_brief/dell_force10_show_ip_interface_brief.yml diff --git a/templates/dell_force10_show_ip_interface_brief.textfsm b/templates/dell_force10_show_ip_interface_brief.textfsm index 72c3cde7ec..173e6c1d93 100644 --- a/templates/dell_force10_show_ip_interface_brief.textfsm +++ b/templates/dell_force10_show_ip_interface_brief.textfsm @@ -1,4 +1,4 @@ -Value INTF(\S+ \S+) +Value INTF (\S+ \S+) Value IPADDR (\S+) Value OK (YES|NO) Value METHOD (None|Manual) diff --git a/templates/index b/templates/index index e27e54fb79..144487c9f1 100644 --- a/templates/index +++ b/templates/index @@ -375,6 +375,7 @@ cisco_xr_show_hsrp.textfsm, .*, cisco_xr, sh[[ow]] hs[[rp]] cisco_xr_show_arp.textfsm, .*, cisco_xr, sh[[ow]] arp cisco_xr_show_bgp.textfsm, .*, cisco_xr, sh[[ow]] bg[[p]] +dell_force10_show_ip_interface_brief.textfsm, .*, dell_force10, sh[[ow]] ip int[[erface]] br[[ief]] dell_force10_show_vlan_brief.textfsm, .*, dell_force10, sh[[ow]] vl[[an]] br[[ief]] dell_force10_show_version.textfsm, .*, dell_force10, sh[[ow]] ver[[sion]] dell_force10_show_vlan.textfsm, .*, dell_force10, sh[[ow]] vl[[an]] diff --git a/tests/dell_force10/show_ip_interface_brief/dell_force10_show_ip_interface_brief.raw b/tests/dell_force10/show_ip_interface_brief/dell_force10_show_ip_interface_brief.raw new file mode 100644 index 0000000000..11ee9fa003 --- /dev/null +++ b/tests/dell_force10/show_ip_interface_brief/dell_force10_show_ip_interface_brief.raw @@ -0,0 +1,55 @@ +Interface IP-Address OK Method Status Protocol +TenGigabitEthernet 0/1 unassigned NO None up down +TenGigabitEthernet 0/2 unassigned NO None up down +TenGigabitEthernet 0/3 unassigned YES None up up +TenGigabitEthernet 0/4 unassigned YES None up up +TenGigabitEthernet 0/5 unassigned YES None up up +TenGigabitEthernet 0/6 unassigned NO None up down +TenGigabitEthernet 0/7 unassigned NO None up down +TenGigabitEthernet 0/8 unassigned NO None up down +TenGigabitEthernet 0/9 unassigned NO None up down +TenGigabitEthernet 0/10 unassigned YES None up up +TenGigabitEthernet 0/11 unassigned YES None up up +TenGigabitEthernet 0/12 unassigned YES None up up +TenGigabitEthernet 0/13 unassigned YES None up up +TenGigabitEthernet 0/14 unassigned NO None up down +TenGigabitEthernet 0/15 unassigned NO None up down +TenGigabitEthernet 0/16 unassigned NO None up down +TenGigabitEthernet 0/17 unassigned NO None up down +TenGigabitEthernet 0/18 unassigned NO None up down +TenGigabitEthernet 0/19 unassigned NO None up down +TenGigabitEthernet 0/20 unassigned NO None up down +TenGigabitEthernet 0/21 unassigned NO None up down +TenGigabitEthernet 0/22 unassigned NO None up down +TenGigabitEthernet 0/23 unassigned NO None up down +TenGigabitEthernet 0/24 unassigned NO None up down +TenGigabitEthernet 0/25 unassigned NO None up down +TenGigabitEthernet 0/26 unassigned NO None up down +TenGigabitEthernet 0/27 unassigned NO None up down +TenGigabitEthernet 0/28 unassigned NO None up down +TenGigabitEthernet 0/29 unassigned NO None up down +TenGigabitEthernet 0/30 unassigned NO None up down +TenGigabitEthernet 0/31 unassigned NO None up down +TenGigabitEthernet 0/32 unassigned NO None up down +TenGigabitEthernet 0/33 unassigned NO None up down +TenGigabitEthernet 0/34 unassigned NO None up down +TenGigabitEthernet 0/35 unassigned NO None up down +TenGigabitEthernet 0/36 unassigned NO None up down +TenGigabitEthernet 0/37 unassigned NO None up down +TenGigabitEthernet 0/38 unassigned NO None up down +TenGigabitEthernet 0/39 unassigned NO None up down +TenGigabitEthernet 0/40 unassigned NO None up down +TenGigabitEthernet 0/41 unassigned YES None up up +TenGigabitEthernet 0/42 unassigned YES None up up +TenGigabitEthernet 0/43 unassigned YES None up up +TenGigabitEthernet 0/44 unassigned YES None up up +TenGigabitEthernet 0/49 unassigned NO None up down +TenGigabitEthernet 0/50 unassigned NO None up down +TenGigabitEthernet 0/51 unassigned NO None up down +TenGigabitEthernet 0/52 unassigned NO None up down +TenGigabitEthernet 0/53 unassigned NO None up down +TenGigabitEthernet 0/54 unassigned NO None up down +TenGigabitEthernet 0/55 unassigned NO None up down +TenGigabitEthernet 0/56 unassigned NO None up down +ManagementEthernet 0/0 10.151.5.208 YES Manual up up +Port-channel 128 unassigned YES None up up \ No newline at end of file diff --git a/tests/dell_force10/show_ip_interface_brief/dell_force10_show_ip_interface_brief.yml b/tests/dell_force10/show_ip_interface_brief/dell_force10_show_ip_interface_brief.yml new file mode 100644 index 0000000000..89dd2c605c --- /dev/null +++ b/tests/dell_force10/show_ip_interface_brief/dell_force10_show_ip_interface_brief.yml @@ -0,0 +1,326 @@ +--- +parsed_sample: + - intf: "TenGigabitEthernet 0/1" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/2" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/3" + ipaddr: "unassigned" + ok: "YES" + method: "None" + status: "up" + proto: "up" + - intf: "TenGigabitEthernet 0/4" + ipaddr: "unassigned" + ok: "YES" + method: "None" + status: "up" + proto: "up" + - intf: "TenGigabitEthernet 0/5" + ipaddr: "unassigned" + ok: "YES" + method: "None" + status: "up" + proto: "up" + - intf: "TenGigabitEthernet 0/6" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/7" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/8" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/9" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/10" + ipaddr: "unassigned" + ok: "YES" + method: "None" + status: "up" + proto: "up" + - intf: "TenGigabitEthernet 0/11" + ipaddr: "unassigned" + ok: "YES" + method: "None" + status: "up" + proto: "up" + - intf: "TenGigabitEthernet 0/12" + ipaddr: "unassigned" + ok: "YES" + method: "None" + status: "up" + proto: "up" + - intf: "TenGigabitEthernet 0/13" + ipaddr: "unassigned" + ok: "YES" + method: "None" + status: "up" + proto: "up" + - intf: "TenGigabitEthernet 0/14" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/15" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/16" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/17" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/18" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/19" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/20" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/21" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/22" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/23" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/24" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/25" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/26" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/27" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/28" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/29" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/30" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/31" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/32" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/33" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/34" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/35" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/36" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/37" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/38" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/39" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/40" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/41" + ipaddr: "unassigned" + ok: "YES" + method: "None" + status: "up" + proto: "up" + - intf: "TenGigabitEthernet 0/42" + ipaddr: "unassigned" + ok: "YES" + method: "None" + status: "up" + proto: "up" + - intf: "TenGigabitEthernet 0/43" + ipaddr: "unassigned" + ok: "YES" + method: "None" + status: "up" + proto: "up" + - intf: "TenGigabitEthernet 0/44" + ipaddr: "unassigned" + ok: "YES" + method: "None" + status: "up" + proto: "up" + - intf: "TenGigabitEthernet 0/49" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/50" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/51" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/52" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/53" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/54" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/55" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "TenGigabitEthernet 0/56" + ipaddr: "unassigned" + ok: "NO" + method: "None" + status: "up" + proto: "down" + - intf: "ManagementEthernet 0/0" + ipaddr: "10.151.5.208" + ok: "YES" + method: "Manual" + status: "up" + proto: "up" + - intf: "Port-channel 128" + ipaddr: "unassigned" + ok: "YES" + method: "None" + status: "up" + proto: "up"