Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New template: cisco_ios_show_power_inline.textfsm #1881

Merged
merged 16 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions ntc_templates/templates/cisco_ios_show_power_inline.textfsm
Original file line number Diff line number Diff line change
@@ -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+)
JKLs12 marked this conversation as resolved.
Show resolved Hide resolved

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
JKLs12 marked this conversation as resolved.
Show resolved Hide resolved
^Totals.*
^\s+\(Watts\)
^-+
^\s*$$
^. -> Error
3 changes: 2 additions & 1 deletion ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ 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_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]]
Expand All @@ -301,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]]
Expand Down
Original file line number Diff line number Diff line change
@@ -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
JKLs12 marked this conversation as resolved.
Show resolved Hide resolved
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
JKLs12 marked this conversation as resolved.
Show resolved Hide resolved
--------- ------ ---------- ---------- ---------- ------ -----
Totals: 11 on 330.0

170 changes: 170 additions & 0 deletions tests/cisco_ios/show_power_inline/show_power_inline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
---
parsed_sample:
- Admin: auto

Check failure on line 3 in tests/cisco_ios/show_power_inline/show_power_inline.yml

View workflow job for this annotation

GitHub Actions / yamllint

3:10 [quoted-strings] string value is not quoted with double quotes
Class: '4'

Check failure on line 4 in tests/cisco_ios/show_power_inline/show_power_inline.yml

View workflow job for this annotation

GitHub Actions / yamllint

4:10 [quoted-strings] string value is not quoted with double quotes
Device: AIR-AP1562I-E-K9

Check failure on line 5 in tests/cisco_ios/show_power_inline/show_power_inline.yml

View workflow job for this annotation

GitHub Actions / yamllint

5:11 [quoted-strings] string value is not quoted with double quotes
Interface: Gi1/0/1

Check failure on line 6 in tests/cisco_ios/show_power_inline/show_power_inline.yml

View workflow job for this annotation

GitHub Actions / yamllint

6:14 [quoted-strings] string value is not quoted with double quotes
Max: '30.0'

Check failure on line 7 in tests/cisco_ios/show_power_inline/show_power_inline.yml

View workflow job for this annotation

GitHub Actions / yamllint

7:8 [quoted-strings] string value is not quoted with double quotes
Oper: 'on'

Check failure on line 8 in tests/cisco_ios/show_power_inline/show_power_inline.yml

View workflow job for this annotation

GitHub Actions / yamllint

8:9 [quoted-strings] string value is not quoted with double quotes
Power: '30.0'

Check failure on line 9 in tests/cisco_ios/show_power_inline/show_power_inline.yml

View workflow job for this annotation

GitHub Actions / yamllint

9:10 [quoted-strings] string value is not quoted with double quotes
- Admin: auto

Check failure on line 10 in tests/cisco_ios/show_power_inline/show_power_inline.yml

View workflow job for this annotation

GitHub Actions / yamllint

10:10 [quoted-strings] string value is not quoted with double quotes
Class: '4'

Check failure on line 11 in tests/cisco_ios/show_power_inline/show_power_inline.yml

View workflow job for this annotation

GitHub Actions / yamllint

11:10 [quoted-strings] string value is not quoted with double quotes
Device: AIR-AP1562I-E-K9

Check failure on line 12 in tests/cisco_ios/show_power_inline/show_power_inline.yml

View workflow job for this annotation

GitHub Actions / yamllint

12:11 [quoted-strings] string value is not quoted with double quotes
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'
Loading