From c831c7523496bc3cb835010654f03b61b66d3274 Mon Sep 17 00:00:00 2001 From: JKLs12 <45732740+JKLs12@users.noreply.github.com> Date: Thu, 17 Oct 2024 13:42:31 +0200 Subject: [PATCH 01/16] cisco_ios_show_power_inline.textfsm --- .../cisco_ios_show_power_inline.textfsm | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 ntc_templates/templates/cisco_ios_show_power_inline.textfsm diff --git a/ntc_templates/templates/cisco_ios_show_power_inline.textfsm b/ntc_templates/templates/cisco_ios_show_power_inline.textfsm new file mode 100644 index 0000000000..27ba832b7d --- /dev/null +++ b/ntc_templates/templates/cisco_ios_show_power_inline.textfsm @@ -0,0 +1,24 @@ +Value Interface (\S+) +Value Admin (\S+) +Value Oper (on|off) +Value Power (\d+\.\d+) +Value Device (\S+(\s\S+)*) +Value Class (\d|n/a) +Value Max (\d+\.\d+) + +Start + ^Interface\s+Admin\s+Oper\s+Power\s+Device\s+Class\s+Max -> Interfaces + ^Module + ^\d+ + ^-+ + ^\s+\(Watts\) + ^\s*$$ + ^. -> Error + +Interfaces + ^\s*${Interface}\s+${Admin}\s+${Oper}\s+${Power}\s+${Device}\s+${Class}\s+${Max}\s*$$ -> Record + ^Totals.* + ^\s+\(Watts\) + ^-+ + ^\s*$$ + ^. -> Error \ No newline at end of file From e23135ed2b804661e00894bf51918fe95323415c Mon Sep 17 00:00:00 2001 From: JKLs12 <45732740+JKLs12@users.noreply.github.com> Date: Thu, 17 Oct 2024 13:47:46 +0200 Subject: [PATCH 02/16] Create cisco_ios_show_power_inline.raw --- .../cisco_ios_show_power_inline/cisco_ios_show_power_inline.raw | 1 + 1 file changed, 1 insertion(+) create mode 100644 tests/cisco_ios/cisco_ios_show_power_inline/cisco_ios_show_power_inline.raw diff --git a/tests/cisco_ios/cisco_ios_show_power_inline/cisco_ios_show_power_inline.raw b/tests/cisco_ios/cisco_ios_show_power_inline/cisco_ios_show_power_inline.raw new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/tests/cisco_ios/cisco_ios_show_power_inline/cisco_ios_show_power_inline.raw @@ -0,0 +1 @@ + From dcf03e9d82bb6a1542bc1a534e216c33ffba8b34 Mon Sep 17 00:00:00 2001 From: JKLs12 <45732740+JKLs12@users.noreply.github.com> Date: Thu, 17 Oct 2024 14:00:31 +0200 Subject: [PATCH 03/16] Create cisco_ios_show_power_inline.raw --- .../cisco_ios_show_power_inline.raw | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 tests/cisco_ios/show_power_inline/cisco_ios_show_power_inline.raw diff --git a/tests/cisco_ios/show_power_inline/cisco_ios_show_power_inline.raw b/tests/cisco_ios/show_power_inline/cisco_ios_show_power_inline.raw new file mode 100644 index 0000000000..1e716d3096 --- /dev/null +++ b/tests/cisco_ios/show_power_inline/cisco_ios_show_power_inline.raw @@ -0,0 +1,35 @@ + +Module Available Used Remaining + (Watts) (Watts) (Watts) +------ --------- -------- --------- +1 740.0 330.0 410.0 +Interface Admin Oper Power Device Class Max + (Watts) +--------- ------ ---------- ------- ------------------- ----- ---- +Gi1/0/1 auto on 30.0 AIR-AP1562I-E-K9 4 30.0 +Gi1/0/2 auto on 30.0 AIR-AP1562I-E-K9 4 30.0 +Gi1/0/3 auto on 30.0 AIR-AP1562I-E-K9 4 30.0 +Gi1/0/4 auto on 30.0 AIR-AP1562I-E-K9 4 30.0 +Gi1/0/5 auto on 30.0 AIR-AP1562I-E-K9 4 30.0 +Gi1/0/6 auto on 30.0 AIR-AP1562I-E-K9 4 30.0 +Gi1/0/7 auto on 30.0 AIR-AP1562I-E-K9 4 30.0 +Gi1/0/8 auto on 30.0 AIR-AP1562I-E-K9 4 30.0 +Gi1/0/9 auto on 30.0 AIR-AP1562I-E-K9 4 30.0 +Gi1/0/10 auto on 23.2 C9120AXE-E 4 30.0 +Gi1/0/11 auto on 30.0 AIR-AP1562I-E-K9 4 30.0 +Gi1/0/12 auto off 0.0 n/a n/a 30.0 +Gi1/0/13 auto off 0.0 n/a n/a 30.0 +Gi1/0/14 auto off 0.0 n/a n/a 30.0 +Gi1/0/15 auto off 0.0 n/a n/a 30.0 +Gi1/0/16 auto off 0.0 n/a n/a 30.0 +Gi1/0/17 auto off 0.0 n/a n/a 30.0 +Gi1/0/18 auto off 0.0 n/a n/a 30.0 +Gi1/0/19 auto off 0.0 n/a n/a 30.0 +Gi1/0/20 auto off 0.0 n/a n/a 30.0 +Gi1/0/21 off off 0.0 n/a n/a 30.0 +Gi1/0/22 auto off 0.0 n/a n/a 30.0 +Gi1/0/23 auto off 0.0 n/a n/a 30.0 +Gi1/0/24 auto off 0.0 n/a n/a 30.0 +--------- ------ ---------- ---------- ---------- ------ ----- +Totals: 11 on 330.0 + From 08bf4fcbe1c2142313364796948b7f1976062525 Mon Sep 17 00:00:00 2001 From: JKLs12 <45732740+JKLs12@users.noreply.github.com> Date: Thu, 17 Oct 2024 14:00:50 +0200 Subject: [PATCH 04/16] Delete tests/cisco_ios/cisco_ios_show_power_inline directory --- .../cisco_ios_show_power_inline/cisco_ios_show_power_inline.raw | 1 - 1 file changed, 1 deletion(-) delete mode 100644 tests/cisco_ios/cisco_ios_show_power_inline/cisco_ios_show_power_inline.raw diff --git a/tests/cisco_ios/cisco_ios_show_power_inline/cisco_ios_show_power_inline.raw b/tests/cisco_ios/cisco_ios_show_power_inline/cisco_ios_show_power_inline.raw deleted file mode 100644 index 8b13789179..0000000000 --- a/tests/cisco_ios/cisco_ios_show_power_inline/cisco_ios_show_power_inline.raw +++ /dev/null @@ -1 +0,0 @@ - From b502879ca837c33353c6cf9fe320864a51d16a6b Mon Sep 17 00:00:00 2001 From: JKLs12 <45732740+JKLs12@users.noreply.github.com> Date: Thu, 17 Oct 2024 14:04:08 +0200 Subject: [PATCH 05/16] Create show_power_inline.yml --- .../show_power_inline/show_power_inline.yml | 170 ++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 tests/cisco_ios/show_power_inline/show_power_inline.yml diff --git a/tests/cisco_ios/show_power_inline/show_power_inline.yml b/tests/cisco_ios/show_power_inline/show_power_inline.yml new file mode 100644 index 0000000000..bd4d6b8d4a --- /dev/null +++ b/tests/cisco_ios/show_power_inline/show_power_inline.yml @@ -0,0 +1,170 @@ +--- +parsed_sample: +- Admin: auto + Class: '4' + Device: AIR-AP1562I-E-K9 + Interface: Gi1/0/1 + Max: '30.0' + Oper: 'on' + Power: '30.0' +- Admin: auto + Class: '4' + Device: AIR-AP1562I-E-K9 + Interface: Gi1/0/2 + Max: '30.0' + Oper: 'on' + Power: '30.0' +- Admin: auto + Class: '4' + Device: AIR-AP1562I-E-K9 + Interface: Gi1/0/3 + Max: '30.0' + Oper: 'on' + Power: '30.0' +- Admin: auto + Class: '4' + Device: AIR-AP1562I-E-K9 + Interface: Gi1/0/4 + Max: '30.0' + Oper: 'on' + Power: '30.0' +- Admin: auto + Class: '4' + Device: AIR-AP1562I-E-K9 + Interface: Gi1/0/5 + Max: '30.0' + Oper: 'on' + Power: '30.0' +- Admin: auto + Class: '4' + Device: AIR-AP1562I-E-K9 + Interface: Gi1/0/6 + Max: '30.0' + Oper: 'on' + Power: '30.0' +- Admin: auto + Class: '4' + Device: AIR-AP1562I-E-K9 + Interface: Gi1/0/7 + Max: '30.0' + Oper: 'on' + Power: '30.0' +- Admin: auto + Class: '4' + Device: AIR-AP1562I-E-K9 + Interface: Gi1/0/8 + Max: '30.0' + Oper: 'on' + Power: '30.0' +- Admin: auto + Class: '4' + Device: AIR-AP1562I-E-K9 + Interface: Gi1/0/9 + Max: '30.0' + Oper: 'on' + Power: '30.0' +- Admin: auto + Class: '4' + Device: C9120AXE-E + Interface: Gi1/0/10 + Max: '30.0' + Oper: 'on' + Power: '23.2' +- Admin: auto + Class: '4' + Device: AIR-AP1562I-E-K9 + Interface: Gi1/0/11 + Max: '30.0' + Oper: 'on' + Power: '30.0' +- Admin: auto + Class: n/a + Device: n/a + Interface: Gi1/0/12 + Max: '30.0' + Oper: 'off' + Power: '0.0' +- Admin: auto + Class: n/a + Device: n/a + Interface: Gi1/0/13 + Max: '30.0' + Oper: 'off' + Power: '0.0' +- Admin: auto + Class: n/a + Device: n/a + Interface: Gi1/0/14 + Max: '30.0' + Oper: 'off' + Power: '0.0' +- Admin: auto + Class: n/a + Device: n/a + Interface: Gi1/0/15 + Max: '30.0' + Oper: 'off' + Power: '0.0' +- Admin: auto + Class: n/a + Device: n/a + Interface: Gi1/0/16 + Max: '30.0' + Oper: 'off' + Power: '0.0' +- Admin: auto + Class: n/a + Device: n/a + Interface: Gi1/0/17 + Max: '30.0' + Oper: 'off' + Power: '0.0' +- Admin: auto + Class: n/a + Device: n/a + Interface: Gi1/0/18 + Max: '30.0' + Oper: 'off' + Power: '0.0' +- Admin: auto + Class: n/a + Device: n/a + Interface: Gi1/0/19 + Max: '30.0' + Oper: 'off' + Power: '0.0' +- Admin: auto + Class: n/a + Device: n/a + Interface: Gi1/0/20 + Max: '30.0' + Oper: 'off' + Power: '0.0' +- Admin: 'off' + Class: n/a + Device: n/a + Interface: Gi1/0/21 + Max: '30.0' + Oper: 'off' + Power: '0.0' +- Admin: auto + Class: n/a + Device: n/a + Interface: Gi1/0/22 + Max: '30.0' + Oper: 'off' + Power: '0.0' +- Admin: auto + Class: n/a + Device: n/a + Interface: Gi1/0/23 + Max: '30.0' + Oper: 'off' + Power: '0.0' +- Admin: auto + Class: n/a + Device: n/a + Interface: Gi1/0/24 + Max: '30.0' + Oper: 'off' + Power: '0.0' From 0ba8bfd9cfcb6a14449d60a3d31c708d4b40546c Mon Sep 17 00:00:00 2001 From: JKLs12 <45732740+JKLs12@users.noreply.github.com> Date: Thu, 17 Oct 2024 14:11:27 +0200 Subject: [PATCH 06/16] Update index --- ntc_templates/templates/index | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 270a6ec688..94dfece7f0 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -278,7 +278,8 @@ cisco_ios_show_ip_route_summary.textfsm, .*, cisco_ios, sh[[ow]] ip ro[[ute]] su cisco_ios_show_ip_access-lists.textfsm, .*, cisco_ios, sh[[ow]] ip acce[[ss-lists]] cisco_ios_show_ip_dhcp_binding.textfsm, .*, cisco_ios, sh[[ow]] ip dh[[cp]] b[[inding]] cisco_ios_show_mpls_interfaces.textfsm, .*, cisco_ios, sh[[ow]] mpls interfa[[ces]] -cisco_ios_show_power_available.textfsm, .*, cisco_ios, sh[[ow]] pow[[er]] a[[vailable]] +cisco_ios_show_power_available.textfsm, .*, cisco_ios, sh[[ow]] pow[[er]] a[[vailable]] +cisco_ios_show_power_inline.textfsm, .*, cisco_ios, sh[[ow]] pow[[er]] i[[nline]] cisco_ios_show_access-session.textfsm, .*, cisco_ios, show access-s[[ession]] cisco_ios_show_alert_counters.textfsm, .*, cisco_ios, sh[[ow]] alert [[counters]] cisco_ios_show_interface_link.textfsm, .*, cisco_ios, sh[[ow]] int[[erfaces]] li[[nk]] From 04113358cbad354eb0c210c9531cd3677fbc14e4 Mon Sep 17 00:00:00 2001 From: JKLs12 <45732740+JKLs12@users.noreply.github.com> Date: Thu, 17 Oct 2024 14:14:22 +0200 Subject: [PATCH 07/16] Update index --- ntc_templates/templates/index | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 94dfece7f0..2275b93311 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -279,7 +279,6 @@ cisco_ios_show_ip_access-lists.textfsm, .*, cisco_ios, sh[[ow]] ip acce[[ss-list cisco_ios_show_ip_dhcp_binding.textfsm, .*, cisco_ios, sh[[ow]] ip dh[[cp]] b[[inding]] cisco_ios_show_mpls_interfaces.textfsm, .*, cisco_ios, sh[[ow]] mpls interfa[[ces]] cisco_ios_show_power_available.textfsm, .*, cisco_ios, sh[[ow]] pow[[er]] a[[vailable]] -cisco_ios_show_power_inline.textfsm, .*, cisco_ios, sh[[ow]] pow[[er]] i[[nline]] cisco_ios_show_access-session.textfsm, .*, cisco_ios, show access-s[[ession]] cisco_ios_show_alert_counters.textfsm, .*, cisco_ios, sh[[ow]] alert [[counters]] cisco_ios_show_interface_link.textfsm, .*, cisco_ios, sh[[ow]] int[[erfaces]] li[[nk]] @@ -302,6 +301,7 @@ cisco_ios_show_standby_brief.textfsm, .*, cisco_ios, sh[[ow]] standby(?:\s+\S+)? cisco_ios_show_file_systems.textfsm, .*, cisco_ios, sh[[ow]] fi[[le]] s[[ystems]] cisco_ios_show_ip_interface.textfsm, .*, cisco_ios, sh[[ow]] ip int[[erface]] cisco_ios_show_object-group.textfsm, .*, cisco_ios, sh[[ow]] ob[[ject-group]] +cisco_ios_show_power_inline.textfsm, .*, cisco_ios, sh[[ow]] pow[[er]] i[[nline]] cisco_ios_show_power_status.textfsm, .*, cisco_ios, sh[[ow]] pow[[er]] st[[atus]] cisco_ios_show_rep_topology.textfsm, .*, cisco_ios, sh[[ow]] rep topology cisco_ios_show_access-list.textfsm, .*, cisco_ios, sh[[ow]] acc[[ess-list]] From b23c338dc041ec505c16ec7aa0b1dfcb11549d0c Mon Sep 17 00:00:00 2001 From: Jacob McGill <9847006+jmcgill298@users.noreply.github.com> Date: Thu, 17 Oct 2024 10:01:27 -0400 Subject: [PATCH 08/16] Update ntc_templates/templates/cisco_ios_show_power_inline.textfsm --- ntc_templates/templates/cisco_ios_show_power_inline.textfsm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntc_templates/templates/cisco_ios_show_power_inline.textfsm b/ntc_templates/templates/cisco_ios_show_power_inline.textfsm index 27ba832b7d..5d04352610 100644 --- a/ntc_templates/templates/cisco_ios_show_power_inline.textfsm +++ b/ntc_templates/templates/cisco_ios_show_power_inline.textfsm @@ -21,4 +21,4 @@ Interfaces ^\s+\(Watts\) ^-+ ^\s*$$ - ^. -> Error \ No newline at end of file + ^. -> Error From a214c78bd5e45209870a388fbe09211a042b98e6 Mon Sep 17 00:00:00 2001 From: JKLs12 <45732740+JKLs12@users.noreply.github.com> Date: Thu, 17 Oct 2024 16:55:04 +0200 Subject: [PATCH 09/16] Update show_power_inline.yml --- .../show_power_inline/show_power_inline.yml | 336 +++++++++--------- 1 file changed, 168 insertions(+), 168 deletions(-) diff --git a/tests/cisco_ios/show_power_inline/show_power_inline.yml b/tests/cisco_ios/show_power_inline/show_power_inline.yml index bd4d6b8d4a..5d26e0bb8f 100644 --- a/tests/cisco_ios/show_power_inline/show_power_inline.yml +++ b/tests/cisco_ios/show_power_inline/show_power_inline.yml @@ -1,170 +1,170 @@ --- parsed_sample: -- Admin: auto - Class: '4' - Device: AIR-AP1562I-E-K9 - Interface: Gi1/0/1 - Max: '30.0' - Oper: 'on' - Power: '30.0' -- Admin: auto - Class: '4' - Device: AIR-AP1562I-E-K9 - Interface: Gi1/0/2 - Max: '30.0' - Oper: 'on' - Power: '30.0' -- Admin: auto - Class: '4' - Device: AIR-AP1562I-E-K9 - Interface: Gi1/0/3 - Max: '30.0' - Oper: 'on' - Power: '30.0' -- Admin: auto - Class: '4' - Device: AIR-AP1562I-E-K9 - Interface: Gi1/0/4 - Max: '30.0' - Oper: 'on' - Power: '30.0' -- Admin: auto - Class: '4' - Device: AIR-AP1562I-E-K9 - Interface: Gi1/0/5 - Max: '30.0' - Oper: 'on' - Power: '30.0' -- Admin: auto - Class: '4' - Device: AIR-AP1562I-E-K9 - Interface: Gi1/0/6 - Max: '30.0' - Oper: 'on' - Power: '30.0' -- Admin: auto - Class: '4' - Device: AIR-AP1562I-E-K9 - Interface: Gi1/0/7 - Max: '30.0' - Oper: 'on' - Power: '30.0' -- Admin: auto - Class: '4' - Device: AIR-AP1562I-E-K9 - Interface: Gi1/0/8 - Max: '30.0' - Oper: 'on' - Power: '30.0' -- Admin: auto - Class: '4' - Device: AIR-AP1562I-E-K9 - Interface: Gi1/0/9 - Max: '30.0' - Oper: 'on' - Power: '30.0' -- Admin: auto - Class: '4' - Device: C9120AXE-E - Interface: Gi1/0/10 - Max: '30.0' - Oper: 'on' - Power: '23.2' -- Admin: auto - Class: '4' - Device: AIR-AP1562I-E-K9 - Interface: Gi1/0/11 - Max: '30.0' - Oper: 'on' - Power: '30.0' -- Admin: auto - Class: n/a - Device: n/a - Interface: Gi1/0/12 - Max: '30.0' - Oper: 'off' - Power: '0.0' -- Admin: auto - Class: n/a - Device: n/a - Interface: Gi1/0/13 - Max: '30.0' - Oper: 'off' - Power: '0.0' -- Admin: auto - Class: n/a - Device: n/a - Interface: Gi1/0/14 - Max: '30.0' - Oper: 'off' - Power: '0.0' -- Admin: auto - Class: n/a - Device: n/a - Interface: Gi1/0/15 - Max: '30.0' - Oper: 'off' - Power: '0.0' -- Admin: auto - Class: n/a - Device: n/a - Interface: Gi1/0/16 - Max: '30.0' - Oper: 'off' - Power: '0.0' -- Admin: auto - Class: n/a - Device: n/a - Interface: Gi1/0/17 - Max: '30.0' - Oper: 'off' - Power: '0.0' -- Admin: auto - Class: n/a - Device: n/a - Interface: Gi1/0/18 - Max: '30.0' - Oper: 'off' - Power: '0.0' -- Admin: auto - Class: n/a - Device: n/a - Interface: Gi1/0/19 - Max: '30.0' - Oper: 'off' - Power: '0.0' -- Admin: auto - Class: n/a - Device: n/a - Interface: Gi1/0/20 - Max: '30.0' - Oper: 'off' - Power: '0.0' -- Admin: 'off' - Class: n/a - Device: n/a - Interface: Gi1/0/21 - Max: '30.0' - Oper: 'off' - Power: '0.0' -- Admin: auto - Class: n/a - Device: n/a - Interface: Gi1/0/22 - Max: '30.0' - Oper: 'off' - Power: '0.0' -- Admin: auto - Class: n/a - Device: n/a - Interface: Gi1/0/23 - Max: '30.0' - Oper: 'off' - Power: '0.0' -- Admin: auto - Class: n/a - Device: n/a - Interface: Gi1/0/24 - Max: '30.0' - Oper: 'off' - Power: '0.0' +- Admin: "auto" + Class: "4" + Device: "AIR-AP1562I-E-K9" + Interface: "Gi1/0/1" + Max: "30.0" + Oper: "on" + Power: "30.0" +- Admin: "auto" + Class: "4" + Device: "AIR-AP1562I-E-K9" + Interface: "Gi1/0/2" + Max: "30.0" + Oper: "on" + Power: "30.0" +- Admin: "auto" + Class: "4" + Device: "AIR-AP1562I-E-K9" + Interface: "Gi1/0/3" + Max: "30.0" + Oper: "on" + Power: "30.0" +- Admin: "auto" + Class: "4" + Device: "AIR-AP1562I-E-K9" + Interface: "Gi1/0/4" + Max: "30.0" + Oper: "on" + Power: "30.0" +- Admin: "auto" + Class: "4" + Device: "AIR-AP1562I-E-K9" + Interface: "Gi1/0/5" + Max: "30.0" + Oper: "on" + Power: "30.0" +- Admin: "auto" + Class: "4" + Device: "AIR-AP1562I-E-K9" + Interface: "Gi1/0/6" + Max: "30.0" + Oper: "on" + Power: "30.0" +- Admin: "auto" + Class: "4" + Device: "AIR-AP1562I-E-K9" + Interface: "Gi1/0/7" + Max: "30.0" + Oper: "on" + Power: "30.0" +- Admin: "auto" + Class: "4" + Device: "AIR-AP1562I-E-K9" + Interface: "Gi1/0/8" + Max: "30.0" + Oper: "on" + Power: "30.0" +- Admin: "auto" + Class: "4" + Device: "AIR-AP1562I-E-K9" + Interface: "Gi1/0/9" + Max: "30.0" + Oper: "on" + Power: "30.0" +- Admin: "auto" + Class: "4" + Device: "C9120AXE-E" + Interface: "Gi1/0/10" + Max: "30.0" + Oper: "on" + Power: "23.2" +- Admin: "auto" + Class: "4" + Device: "AIR-AP1562I-E-K9" + Interface: "Gi1/0/11" + Max: "30.0" + Oper: "on" + Power: "30.0" +- Admin: "auto" + Class: "n/a" + Device: "n/a" + Interface: "Gi1/0/12" + Max: "30.0" + Oper: "off" + Power: "0.0" +- Admin: "auto" + Class: "n/a" + Device: "n/a" + Interface: "Gi1/0/13" + Max: "30.0" + Oper: "off" + Power: "0.0" +- Admin: "auto" + Class: "n/a" + Device: "n/a" + Interface: "Gi1/0/14" + Max: "30.0" + Oper: "off" + Power: "0.0" +- Admin: "auto" + Class: "n/a" + Device: "n/a" + Interface: "Gi1/0/15" + Max: "30.0" + Oper: "off" + Power: "0.0" +- Admin: "auto" + Class: "n/a" + Device: "n/a" + Interface: "Gi1/0/16" + Max: "30.0" + Oper: "off" + Power: "0.0" +- Admin: "auto" + Class: "n/a" + Device: "n/a" + Interface: "Gi1/0/17" + Max: "30.0" + Oper: "off" + Power: "0.0" +- Admin: "auto" + Class: "n/a" + Device: "n/a" + Interface: "Gi1/0/18" + Max: "30.0" + Oper: "off" + Power: "0.0" +- Admin: "auto" + Class: "n/a" + Device: "n/a" + Interface: "Gi1/0/19" + Max: "30.0" + Oper: "off" + Power: "0.0" +- Admin: "auto" + Class: "n/a" + Device: "n/a" + Interface: "Gi1/0/20" + Max: "30.0" + Oper: "off" + Power: "0.0" +- Admin: "off" + Class: "n/a" + Device: "n/a" + Interface: "Gi1/0/21" + Max: "30.0" + Oper: "off" + Power: "0.0" +- Admin: "auto" + Class: "n/a" + Device: "n/a" + Interface: "Gi1/0/22" + Max: "30.0" + Oper: "off" + Power: "0.0" +- Admin: "auto" + Class: "n/a" + Device: "n/a" + Interface: "Gi1/0/23" + Max: "30.0" + Oper: "off" + Power: "0.0" +- Admin: "auto" + Class: "n/a" + Device: "n/a" + Interface: "Gi1/0/24" + Max: "30.0" + Oper: "off" + Power: "0.0" From ed239f7c4eea1c02a5353df54437b426ba831830 Mon Sep 17 00:00:00 2001 From: JKLs12 <45732740+JKLs12@users.noreply.github.com> Date: Thu, 17 Oct 2024 17:16:46 +0200 Subject: [PATCH 10/16] Rename show_power_inline.yml to cisco_ios_show_power_inline.yml --- .../{show_power_inline.yml => cisco_ios_show_power_inline.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/cisco_ios/show_power_inline/{show_power_inline.yml => cisco_ios_show_power_inline.yml} (100%) diff --git a/tests/cisco_ios/show_power_inline/show_power_inline.yml b/tests/cisco_ios/show_power_inline/cisco_ios_show_power_inline.yml similarity index 100% rename from tests/cisco_ios/show_power_inline/show_power_inline.yml rename to tests/cisco_ios/show_power_inline/cisco_ios_show_power_inline.yml From 7c2e7f8965e242c266ef1975fb088483b1b0d344 Mon Sep 17 00:00:00 2001 From: JKLs12 <45732740+JKLs12@users.noreply.github.com> Date: Fri, 18 Oct 2024 09:13:58 +0200 Subject: [PATCH 11/16] Update ntc_templates/templates/cisco_ios_show_power_inline.textfsm Co-authored-by: Jacob McGill <9847006+jmcgill298@users.noreply.github.com> --- .../templates/cisco_ios_show_power_inline.textfsm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ntc_templates/templates/cisco_ios_show_power_inline.textfsm b/ntc_templates/templates/cisco_ios_show_power_inline.textfsm index 5d04352610..1cf2045e9f 100644 --- a/ntc_templates/templates/cisco_ios_show_power_inline.textfsm +++ b/ntc_templates/templates/cisco_ios_show_power_inline.textfsm @@ -1,10 +1,11 @@ -Value Interface (\S+) -Value Admin (\S+) -Value Oper (on|off) -Value Power (\d+\.\d+) -Value Device (\S+(\s\S+)*) -Value Class (\d|n/a) -Value Max (\d+\.\d+) +Value INTERFACE (\S+) +Value ADMIN_STATUS (\S+) +Value OPERATIONAL_STATUS (on|off) +Value POWER (\d+\.\d+) +Value DEVICE (\S+(\s\S+)*) +Value CLASS (\d|n/a) +Value MAX (\d+\.\d+) + Start ^Interface\s+Admin\s+Oper\s+Power\s+Device\s+Class\s+Max -> Interfaces From fd78b072727a19a4271c7447e8249f1e33e566a8 Mon Sep 17 00:00:00 2001 From: JKLs12 <45732740+JKLs12@users.noreply.github.com> Date: Fri, 18 Oct 2024 09:14:40 +0200 Subject: [PATCH 12/16] Update tests/cisco_ios/show_power_inline/cisco_ios_show_power_inline.yml Co-authored-by: Jacob McGill <9847006+jmcgill298@users.noreply.github.com> --- .../cisco_ios_show_power_inline.yml | 217 ++++-------------- 1 file changed, 49 insertions(+), 168 deletions(-) diff --git a/tests/cisco_ios/show_power_inline/cisco_ios_show_power_inline.yml b/tests/cisco_ios/show_power_inline/cisco_ios_show_power_inline.yml index 5d26e0bb8f..135493120b 100644 --- a/tests/cisco_ios/show_power_inline/cisco_ios_show_power_inline.yml +++ b/tests/cisco_ios/show_power_inline/cisco_ios_show_power_inline.yml @@ -1,170 +1,51 @@ --- parsed_sample: -- Admin: "auto" - Class: "4" - Device: "AIR-AP1562I-E-K9" - Interface: "Gi1/0/1" - Max: "30.0" - Oper: "on" - Power: "30.0" -- Admin: "auto" - Class: "4" - Device: "AIR-AP1562I-E-K9" - Interface: "Gi1/0/2" - Max: "30.0" - Oper: "on" - Power: "30.0" -- Admin: "auto" - Class: "4" - Device: "AIR-AP1562I-E-K9" - Interface: "Gi1/0/3" - Max: "30.0" - Oper: "on" - Power: "30.0" -- Admin: "auto" - Class: "4" - Device: "AIR-AP1562I-E-K9" - Interface: "Gi1/0/4" - Max: "30.0" - Oper: "on" - Power: "30.0" -- Admin: "auto" - Class: "4" - Device: "AIR-AP1562I-E-K9" - Interface: "Gi1/0/5" - Max: "30.0" - Oper: "on" - Power: "30.0" -- Admin: "auto" - Class: "4" - Device: "AIR-AP1562I-E-K9" - Interface: "Gi1/0/6" - Max: "30.0" - Oper: "on" - Power: "30.0" -- Admin: "auto" - Class: "4" - Device: "AIR-AP1562I-E-K9" - Interface: "Gi1/0/7" - Max: "30.0" - Oper: "on" - Power: "30.0" -- Admin: "auto" - Class: "4" - Device: "AIR-AP1562I-E-K9" - Interface: "Gi1/0/8" - Max: "30.0" - Oper: "on" - Power: "30.0" -- Admin: "auto" - Class: "4" - Device: "AIR-AP1562I-E-K9" - Interface: "Gi1/0/9" - Max: "30.0" - Oper: "on" - Power: "30.0" -- Admin: "auto" - Class: "4" - Device: "C9120AXE-E" - Interface: "Gi1/0/10" - Max: "30.0" - Oper: "on" - Power: "23.2" -- Admin: "auto" - Class: "4" - Device: "AIR-AP1562I-E-K9" - Interface: "Gi1/0/11" - Max: "30.0" - Oper: "on" - Power: "30.0" -- Admin: "auto" - Class: "n/a" - Device: "n/a" - Interface: "Gi1/0/12" - Max: "30.0" - Oper: "off" - Power: "0.0" -- Admin: "auto" - Class: "n/a" - Device: "n/a" - Interface: "Gi1/0/13" - Max: "30.0" - Oper: "off" - Power: "0.0" -- Admin: "auto" - Class: "n/a" - Device: "n/a" - Interface: "Gi1/0/14" - Max: "30.0" - Oper: "off" - Power: "0.0" -- Admin: "auto" - Class: "n/a" - Device: "n/a" - Interface: "Gi1/0/15" - Max: "30.0" - Oper: "off" - Power: "0.0" -- Admin: "auto" - Class: "n/a" - Device: "n/a" - Interface: "Gi1/0/16" - Max: "30.0" - Oper: "off" - Power: "0.0" -- Admin: "auto" - Class: "n/a" - Device: "n/a" - Interface: "Gi1/0/17" - Max: "30.0" - Oper: "off" - Power: "0.0" -- Admin: "auto" - Class: "n/a" - Device: "n/a" - Interface: "Gi1/0/18" - Max: "30.0" - Oper: "off" - Power: "0.0" -- Admin: "auto" - Class: "n/a" - Device: "n/a" - Interface: "Gi1/0/19" - Max: "30.0" - Oper: "off" - Power: "0.0" -- Admin: "auto" - Class: "n/a" - Device: "n/a" - Interface: "Gi1/0/20" - Max: "30.0" - Oper: "off" - Power: "0.0" -- Admin: "off" - Class: "n/a" - Device: "n/a" - Interface: "Gi1/0/21" - Max: "30.0" - Oper: "off" - Power: "0.0" -- Admin: "auto" - Class: "n/a" - Device: "n/a" - Interface: "Gi1/0/22" - Max: "30.0" - Oper: "off" - Power: "0.0" -- Admin: "auto" - Class: "n/a" - Device: "n/a" - Interface: "Gi1/0/23" - Max: "30.0" - Oper: "off" - Power: "0.0" -- Admin: "auto" - Class: "n/a" - Device: "n/a" - Interface: "Gi1/0/24" - Max: "30.0" - Oper: "off" - Power: "0.0" +- admin_status: "auto" + class: "4" + device: "AIR-AP1562I-E-K9" + interface: "Gi1/0/1" + max: "30.0" + operational_status: "on" + power: "30.0" +- admin_status: "auto" + class: "4" + device: "AIR-AP1562I-E-K9" + interface: "Gi1/0/2" + max: "30.0" + operational_status: "on" + power: "30.0" +- admin_status: "auto" + class: "4" + device: "AIR-AP1562I-E-K9" + interface: "Gi1/0/3" + max: "30.0" + operational_status: "on" + power: "30.0" +- admin_status: "auto" + class: "4" + device: "C9120AXE-E" + interface: "Gi1/0/10" + max: "30.0" + operational_status: "on" + power: "23.2" +- admin_status: "auto" + class: "4" + device: "AIR-AP1562I-E-K9" + interface: "Gi1/0/11" + max: "30.0" + operational_status: "on" + power: "30.0" +- admin_status: "auto" + class: "n/a" + device: "n/a" + interface: "Gi1/0/12" + max: "30.0" + operational_status: "off" + power: "0.0" +- admin_status: "auto" + class: "n/a" + device: "n/a" + interface: "Gi1/0/13" + max: "30.0" + operational_status: "off" + power: "0.0" From ca76c552b457707cdf96a6651be419c4af3cb1e8 Mon Sep 17 00:00:00 2001 From: JKLs12 <45732740+JKLs12@users.noreply.github.com> Date: Fri, 18 Oct 2024 09:14:55 +0200 Subject: [PATCH 13/16] Update tests/cisco_ios/show_power_inline/cisco_ios_show_power_inline.raw Co-authored-by: Jacob McGill <9847006+jmcgill298@users.noreply.github.com> --- .../show_power_inline/cisco_ios_show_power_inline.raw | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tests/cisco_ios/show_power_inline/cisco_ios_show_power_inline.raw b/tests/cisco_ios/show_power_inline/cisco_ios_show_power_inline.raw index 1e716d3096..ff04ae77bf 100644 --- a/tests/cisco_ios/show_power_inline/cisco_ios_show_power_inline.raw +++ b/tests/cisco_ios/show_power_inline/cisco_ios_show_power_inline.raw @@ -9,12 +9,6 @@ Interface Admin Oper Power Device Class Max Gi1/0/1 auto on 30.0 AIR-AP1562I-E-K9 4 30.0 Gi1/0/2 auto on 30.0 AIR-AP1562I-E-K9 4 30.0 Gi1/0/3 auto on 30.0 AIR-AP1562I-E-K9 4 30.0 -Gi1/0/4 auto on 30.0 AIR-AP1562I-E-K9 4 30.0 -Gi1/0/5 auto on 30.0 AIR-AP1562I-E-K9 4 30.0 -Gi1/0/6 auto on 30.0 AIR-AP1562I-E-K9 4 30.0 -Gi1/0/7 auto on 30.0 AIR-AP1562I-E-K9 4 30.0 -Gi1/0/8 auto on 30.0 AIR-AP1562I-E-K9 4 30.0 -Gi1/0/9 auto on 30.0 AIR-AP1562I-E-K9 4 30.0 Gi1/0/10 auto on 23.2 C9120AXE-E 4 30.0 Gi1/0/11 auto on 30.0 AIR-AP1562I-E-K9 4 30.0 Gi1/0/12 auto off 0.0 n/a n/a 30.0 From 09d609c889282402f8309d8f98214df435ca7536 Mon Sep 17 00:00:00 2001 From: JKLs12 <45732740+JKLs12@users.noreply.github.com> Date: Fri, 18 Oct 2024 09:15:09 +0200 Subject: [PATCH 14/16] Update ntc_templates/templates/cisco_ios_show_power_inline.textfsm Co-authored-by: Jacob McGill <9847006+jmcgill298@users.noreply.github.com> --- ntc_templates/templates/cisco_ios_show_power_inline.textfsm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ntc_templates/templates/cisco_ios_show_power_inline.textfsm b/ntc_templates/templates/cisco_ios_show_power_inline.textfsm index 1cf2045e9f..9321d432c2 100644 --- a/ntc_templates/templates/cisco_ios_show_power_inline.textfsm +++ b/ntc_templates/templates/cisco_ios_show_power_inline.textfsm @@ -17,7 +17,8 @@ Start ^. -> Error Interfaces - ^\s*${Interface}\s+${Admin}\s+${Oper}\s+${Power}\s+${Device}\s+${Class}\s+${Max}\s*$$ -> Record + ^\s*${INTERFACE}\s+${ADMIN_STATUS}\s+${OPERATIONAL_STATUS}\s+${POWER}\s+${DEVICE}\s+${CLASS}\s+${MAX}\s*$$ -> Record + ^Totals.* ^\s+\(Watts\) ^-+ From cba8481c657fc8e718d1c48f2a1272f062faeef2 Mon Sep 17 00:00:00 2001 From: JKLs12 <45732740+JKLs12@users.noreply.github.com> Date: Fri, 18 Oct 2024 09:15:30 +0200 Subject: [PATCH 15/16] Update tests/cisco_ios/show_power_inline/cisco_ios_show_power_inline.raw Co-authored-by: Jacob McGill <9847006+jmcgill298@users.noreply.github.com> --- .../show_power_inline/cisco_ios_show_power_inline.raw | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tests/cisco_ios/show_power_inline/cisco_ios_show_power_inline.raw b/tests/cisco_ios/show_power_inline/cisco_ios_show_power_inline.raw index ff04ae77bf..c30f0d0910 100644 --- a/tests/cisco_ios/show_power_inline/cisco_ios_show_power_inline.raw +++ b/tests/cisco_ios/show_power_inline/cisco_ios_show_power_inline.raw @@ -13,17 +13,6 @@ Gi1/0/10 auto on 23.2 C9120AXE-E 4 30.0 Gi1/0/11 auto on 30.0 AIR-AP1562I-E-K9 4 30.0 Gi1/0/12 auto off 0.0 n/a n/a 30.0 Gi1/0/13 auto off 0.0 n/a n/a 30.0 -Gi1/0/14 auto off 0.0 n/a n/a 30.0 -Gi1/0/15 auto off 0.0 n/a n/a 30.0 -Gi1/0/16 auto off 0.0 n/a n/a 30.0 -Gi1/0/17 auto off 0.0 n/a n/a 30.0 -Gi1/0/18 auto off 0.0 n/a n/a 30.0 -Gi1/0/19 auto off 0.0 n/a n/a 30.0 -Gi1/0/20 auto off 0.0 n/a n/a 30.0 -Gi1/0/21 off off 0.0 n/a n/a 30.0 -Gi1/0/22 auto off 0.0 n/a n/a 30.0 -Gi1/0/23 auto off 0.0 n/a n/a 30.0 -Gi1/0/24 auto off 0.0 n/a n/a 30.0 --------- ------ ---------- ---------- ---------- ------ ----- Totals: 11 on 330.0 From ee774b1180f12f5b8834a1e178efcbbfd513fd58 Mon Sep 17 00:00:00 2001 From: JKLs12 <45732740+JKLs12@users.noreply.github.com> Date: Fri, 18 Oct 2024 16:12:28 +0200 Subject: [PATCH 16/16] Update cisco_ios_show_power_inline.textfsm --- ntc_templates/templates/cisco_ios_show_power_inline.textfsm | 2 -- 1 file changed, 2 deletions(-) diff --git a/ntc_templates/templates/cisco_ios_show_power_inline.textfsm b/ntc_templates/templates/cisco_ios_show_power_inline.textfsm index 9321d432c2..cf9de56ff4 100644 --- a/ntc_templates/templates/cisco_ios_show_power_inline.textfsm +++ b/ntc_templates/templates/cisco_ios_show_power_inline.textfsm @@ -6,7 +6,6 @@ Value DEVICE (\S+(\s\S+)*) Value CLASS (\d|n/a) Value MAX (\d+\.\d+) - Start ^Interface\s+Admin\s+Oper\s+Power\s+Device\s+Class\s+Max -> Interfaces ^Module @@ -18,7 +17,6 @@ Start Interfaces ^\s*${INTERFACE}\s+${ADMIN_STATUS}\s+${OPERATIONAL_STATUS}\s+${POWER}\s+${DEVICE}\s+${CLASS}\s+${MAX}\s*$$ -> Record - ^Totals.* ^\s+\(Watts\) ^-+