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

Fixes #790 - new template cisco_nxos_show_environment.textfsm #838

Merged
merged 31 commits into from
Dec 28, 2020
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
767a89e
cisco_nxos_show_version.textfsm update,
Oct 8, 2020
f49b446
Merge branch 'master' of github.com:diepes/ntc-templates
Oct 8, 2020
7dd8dd2
templates/cisco_nxos_show_version.textfsm add new line to end
Oct 8, 2020
fed4669
cisco_ios_show_ip_eigrp_neighbors fix match "VRF default"
Oct 23, 2020
e5e5e4c
cisco_nxos_show_cdp_neighbors_detail
Oct 23, 2020
01d6113
cisco_nxos_show_version match more junk output to
Oct 23, 2020
8021736
index cisco_nxos_show_ip_interface_brief
Oct 23, 2020
7bfe540
cisco_nxos_show_ip_interface_brief_vrf_all
Oct 23, 2020
35d59d9
Merge branch 'master' of github.com:networktocode/ntc-templates
Oct 23, 2020
00bb5c0
implemented fixes suggested with 1st PR
Oct 23, 2020
d0ad229
cisco_nxos_show_version.textfsm
Oct 23, 2020
7186491
cisco_nxos_show_version.textfsm
Oct 23, 2020
f41cff4
cisco_nxos_show_version.textfsm
Oct 23, 2020
319e6b5
Update templates/cisco_nxos_show_cdp_neighbors_detail.textfsm
diepes Nov 16, 2020
36bb0fb
Update templates/cisco_ios_show_ip_eigrp_neighbors.textfsm
diepes Nov 16, 2020
77eac65
Merge remote-tracking branch 'upstream/master'
Dec 1, 2020
bd36d85
Merge branch 'master' of github.com:networktocode/ntc-templates
Dec 3, 2020
0099297
Add new template cisco_nxos_show_environment.textfsm
Dec 5, 2020
d725e9c
Merge branch 'master' of github.com:networktocode/ntc-templates
Dec 5, 2020
2ee2a67
Update templates/cisco_nxos_show_environment.textfsm
diepes Dec 6, 2020
1a53cef
Fixes #790 update old cisco_nxos_show_environment.textfsm to parse ne…
Dec 6, 2020
4719494
FIX#790 from pr revert to original script and just fix.
Dec 6, 2020
dc46704
Fix#790 PR fix, update index , sh envi to sh env
Dec 8, 2020
805f098
Merge remote-tracking branch 'upstream/master'
Dec 9, 2020
c90b9ff
Fix#790 remove POWER_SUPPLY_VOLTAGE, fix match for TEMPERATURE_SENSOR
Dec 10, 2020
3450cbe
Update templates/cisco_nxos_show_environment.textfsm
diepes Dec 10, 2020
52cf539
Fix#790 Fix template, structure a bit better, add comments.
Dec 10, 2020
7962be4
Fix#790 cleanup remove some uncommented lines
Dec 10, 2020
afdaf3d
Fix#790-Filter out Fan header
Dec 10, 2020
f03aeed
Fix#780-Filter Fan header in 2nd test.
Dec 10, 2020
c23ef38
Fix#790 templates/cisco_nxos_show_environment.textfsm
Dec 19, 2020
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
55 changes: 55 additions & 0 deletions templates/cisco_nxos_show_environment.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
Value POWER_SUPPLY (\d+)
Value POWER_SUPPLY_MODEL (\S+)
Value POWER_SUPPLY_OUTPUT (\d+)
Value POWER_SUPPLY_INPUT (\d+)
Value POWER_SUPPLY_CAPACITY (\d+)
Value POWER_SUPPLY_STATUS (\w+)
Value POWER_SUPPLY_VOLTAGE (\d+)
diepes marked this conversation as resolved.
Show resolved Hide resolved
Value FAN (\S+)
Value FAN_STATUS (\S+)
Value TEMPERATURE_MODULE (\d+)
Value TEMPERATURE_SENSOR (\S+)
#([^ \t\r\n\f])
Value TEMPERATURE_MAJOR_THRESH (\d+)
Value TEMPERATURE_MINOR_THRESH (\d+)
Value TEMPERATURE_CURRENT (\d+)
Value TEMPERATURE_STATUS (\S+)

Start
diepes marked this conversation as resolved.
Show resolved Hide resolved
# Note: 2020-12 this template is broken, mashing 4 tables into one.
^Power Supply:\s*$$ -> Power
^Fan:\s*$$ -> Fan
^Temperature:\s*$$ -> Temperature
#^Fan\s+Model\s+Hw\s+(Direction\s+)?Status -> Fan

Power
^Power\s+Actual\s+Total -> Power
^Power\s+Actual\s+Actual\s+Total -> Power
^Voltage:\s+${POWER_SUPPLY_VOLTAGE}\s+Volts -> Record
^${POWER_SUPPLY}\s+${POWER_SUPPLY_MODEL}\s+${POWER_SUPPLY_OUTPUT}\s+\w+\s+${POWER_SUPPLY_CAPACITY}\s+\w+\s+${POWER_SUPPLY_STATUS} -> Record
^${POWER_SUPPLY}\s+${POWER_SUPPLY_MODEL}\s+${POWER_SUPPLY_OUTPUT}\s+\w+\s+${POWER_SUPPLY_INPUT}\s+\w+\s+${POWER_SUPPLY_CAPACITY}\s+\w+\s+${POWER_SUPPLY_STATUS} -> Record
^Module\s+Model\s+Draw\s+Allocated\s+Status\s* -> Start
^Power\s+Usage\s+Summary: -> Start
^\s*$$ -> Start
^Supply\s+Model\s+Output\s+Capacity\s+Status
^Supply\s+Model\s+Output\s+Input\s+Capacity\s+Status
^\s+\(Watts\s\)\s+
^-+\s+-+
^. -> Error

Fan
^${FAN}\s+\S+\s+\S+\s+${FAN_STATUS}\s*$$ -> Record
^${FAN}\s+\S+\s+\S+\s+\S+\s+${FAN_STATUS}\s*$$ -> Record
^\s*$$ -> Start
# Fan Ignore
^Fan\s+Zone\s+Speed
^-+\s*$$
^. -> Error

Temperature
^Module\s+Sensor\s+MajorThresh\s+MinorThres\s+CurTemp\s+Status
^${TEMPERATURE_MODULE}\s+${TEMPERATURE_SENSOR}(\s*\(\S+\))?\s+${TEMPERATURE_MAJOR_THRESH}\s+${TEMPERATURE_MINOR_THRESH}\s+${TEMPERATURE_CURRENT}\s+${TEMPERATURE_STATUS}\s* -> Record
diepes marked this conversation as resolved.
Show resolved Hide resolved
^\s*\(Celsius\)\s+\(Celsius\)
^-+\s*$$
^\s*$$
^. -> Error
29 changes: 0 additions & 29 deletions templates/cisco_nxos_show_environments.textfsm

This file was deleted.

2 changes: 1 addition & 1 deletion templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ cisco_nxos_show_license_usage.textfsm, .*, cisco_nxos, sh[[ow]] lic[[ense]] us[[
cisco_nxos_show_processes_cpu.textfsm, .*, cisco_nxos, sh[[ow]] proc[[esses]] c[[pu]]
cisco_nxos_show_vrf_interface.textfsm, .*, cisco_nxos, sh[[ow]] vrf int[[erface]]
cisco_nxos_show_access-lists.textfsm, .*, cisco_nxos, sh[[ow]] acc[[ess-lists]]
cisco_nxos_show_environments.textfsm, .*, cisco_nxos, sh[[ow]] envi[[ronments]]
diepes marked this conversation as resolved.
Show resolved Hide resolved
cisco_nxos_show_ip_adjacency.textfsm, .*, cisco_nxos, sh[[ow]] ip ad[[jacency]]
cisco_nxos_show_ip_interface.textfsm, .*, cisco_nxos, sh[[ow]] ip int[[erface]]
cisco_nxos_show_environment.textfsm, .*, cisco_nxos, sh[[ow]] envi[[ronment]]
diepes marked this conversation as resolved.
Show resolved Hide resolved
cisco_nxos_show_interface.textfsm, .*, cisco_nxos, sh[[ow]] inte[[rface]]
cisco_nxos_show_inventory.textfsm, .*, cisco_nxos, sh[[ow]] inv[[entory]]
cisco_nxos_show_route-map.textfsm, .*, cisco_nxos, sh[[ow]] route-m[[ap]]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
---
parsed_sample:
- power_supply: ""
power_supply_model: ""
power_supply_output: ""
power_supply_input: ""
power_supply_capacity: ""
power_supply_status: ""
power_supply_voltage: "50"
fan: ""
fan_status: ""
temperature_module: ""
temperature_sensor: ""
temperature_major_thresh: ""
temperature_minor_thresh: ""
temperature_current: ""
temperature_status: ""
- power_supply: "1"
power_supply_model: "N7K-AC-3KW"
power_supply_output: "407"
power_supply_input: ""
power_supply_capacity: "3000"
power_supply_status: "Ok"
power_supply_voltage: ""
fan: ""
fan_status: ""
temperature_module: ""
Expand All @@ -16,8 +33,10 @@ parsed_sample:
- power_supply: "2"
power_supply_model: "N7K-AC-3KW"
power_supply_output: "370"
power_supply_input: ""
power_supply_capacity: "3000"
power_supply_status: "Ok"
power_supply_voltage: ""
fan: ""
fan_status: ""
temperature_module: ""
Expand All @@ -29,8 +48,25 @@ parsed_sample:
- power_supply: ""
power_supply_model: ""
power_supply_output: ""
power_supply_input: ""
power_supply_capacity: ""
power_supply_status: ""
power_supply_voltage: ""
fan: "Fan"
fan_status: "Status"
temperature_module: ""
temperature_sensor: ""
temperature_major_thresh: ""
temperature_minor_thresh: ""
temperature_current: ""
temperature_status: ""
- power_supply: ""
power_supply_model: ""
power_supply_output: ""
power_supply_input: ""
power_supply_capacity: ""
power_supply_status: ""
power_supply_voltage: ""
fan: "Fan1(sys_fan1)"
fan_status: "Ok"
temperature_module: ""
Expand All @@ -42,8 +78,10 @@ parsed_sample:
- power_supply: ""
power_supply_model: ""
power_supply_output: ""
power_supply_input: ""
power_supply_capacity: ""
power_supply_status: ""
power_supply_voltage: ""
fan: "Fan_in_PS1"
fan_status: "Ok"
temperature_module: ""
Expand All @@ -55,8 +93,10 @@ parsed_sample:
- power_supply: ""
power_supply_model: ""
power_supply_output: ""
power_supply_input: ""
power_supply_capacity: ""
power_supply_status: ""
power_supply_voltage: ""
fan: "Fan_in_PS2"
fan_status: "Ok"
temperature_module: ""
Expand All @@ -68,8 +108,10 @@ parsed_sample:
- power_supply: ""
power_supply_model: ""
power_supply_output: ""
power_supply_input: ""
power_supply_capacity: ""
power_supply_status: ""
power_supply_voltage: ""
fan: ""
fan_status: ""
temperature_module: "1"
Expand All @@ -81,8 +123,10 @@ parsed_sample:
- power_supply: ""
power_supply_model: ""
power_supply_output: ""
power_supply_input: ""
power_supply_capacity: ""
power_supply_status: ""
power_supply_voltage: ""
fan: ""
fan_status: ""
temperature_module: "1"
Expand All @@ -94,21 +138,25 @@ parsed_sample:
- power_supply: ""
power_supply_model: ""
power_supply_output: ""
power_supply_input: ""
power_supply_capacity: ""
power_supply_status: ""
power_supply_voltage: ""
fan: ""
fan_status: ""
temperature_module: "1"
temperature_sensor: "Crossbar"
temperature_sensor: "Crossbar(s3)"
temperature_major_thresh: "105"
temperature_minor_thresh: "95"
temperature_current: "41"
temperature_status: "Ok"
- power_supply: ""
power_supply_model: ""
power_supply_output: ""
power_supply_input: ""
power_supply_capacity: ""
power_supply_status: ""
power_supply_voltage: ""
fan: ""
fan_status: ""
temperature_module: "2"
Expand All @@ -120,8 +168,10 @@ parsed_sample:
- power_supply: ""
power_supply_model: ""
power_supply_output: ""
power_supply_input: ""
power_supply_capacity: ""
power_supply_status: ""
power_supply_voltage: ""
fan: ""
fan_status: ""
temperature_module: "2"
Expand All @@ -133,90 +183,104 @@ parsed_sample:
- power_supply: ""
power_supply_model: ""
power_supply_output: ""
power_supply_input: ""
power_supply_capacity: ""
power_supply_status: ""
power_supply_voltage: ""
fan: ""
fan_status: ""
temperature_module: "2"
temperature_sensor: "Crossbar"
temperature_sensor: "Crossbar(s3)"
temperature_major_thresh: "105"
temperature_minor_thresh: "95"
temperature_current: "40"
temperature_status: "Ok"
- power_supply: ""
power_supply_model: ""
power_supply_output: ""
power_supply_input: ""
power_supply_capacity: ""
power_supply_status: ""
power_supply_voltage: ""
fan: ""
fan_status: ""
temperature_module: "3"
temperature_sensor: "MAC0Sn0"
temperature_sensor: "MAC0Sn0(s2)"
temperature_major_thresh: "115"
temperature_minor_thresh: "105"
temperature_current: "42"
temperature_status: "Ok"
- power_supply: ""
power_supply_model: ""
power_supply_output: ""
power_supply_input: ""
power_supply_capacity: ""
power_supply_status: ""
power_supply_voltage: ""
fan: ""
fan_status: ""
temperature_module: "3"
temperature_sensor: "MAC0Sn1"
temperature_sensor: "MAC0Sn1(s3)"
temperature_major_thresh: "115"
temperature_minor_thresh: "105"
temperature_current: "43"
temperature_status: "Ok"
- power_supply: ""
power_supply_model: ""
power_supply_output: ""
power_supply_input: ""
power_supply_capacity: ""
power_supply_status: ""
power_supply_voltage: ""
fan: ""
fan_status: ""
temperature_module: "3"
temperature_sensor: "MAC0-Buf0"
temperature_sensor: "MAC0-Buf0(s4)"
temperature_major_thresh: "115"
temperature_minor_thresh: "105"
temperature_current: "35"
temperature_status: "Ok"
- power_supply: ""
power_supply_model: ""
power_supply_output: ""
power_supply_input: ""
power_supply_capacity: ""
power_supply_status: ""
power_supply_voltage: ""
fan: ""
fan_status: ""
temperature_module: "4"
temperature_sensor: "MAC0Sn0"
temperature_sensor: "MAC0Sn0(s2)"
temperature_major_thresh: "115"
temperature_minor_thresh: "105"
temperature_current: "35"
temperature_status: "Ok"
- power_supply: ""
power_supply_model: ""
power_supply_output: ""
power_supply_input: ""
power_supply_capacity: ""
power_supply_status: ""
power_supply_voltage: ""
fan: ""
fan_status: ""
temperature_module: "4"
temperature_sensor: "MAC0Sn1"
temperature_sensor: "MAC0Sn1(s3)"
temperature_major_thresh: "115"
temperature_minor_thresh: "105"
temperature_current: "36"
temperature_status: "Ok"
- power_supply: ""
power_supply_model: ""
power_supply_output: ""
power_supply_input: ""
power_supply_capacity: ""
power_supply_status: ""
power_supply_voltage: ""
fan: ""
fan_status: ""
temperature_module: "4"
temperature_sensor: "MAC0-Buf0"
temperature_sensor: "MAC0-Buf0(s4)"
temperature_major_thresh: "115"
temperature_minor_thresh: "105"
temperature_current: "46"
Expand Down
Loading