-
Notifications
You must be signed in to change notification settings - Fork 696
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added template for cisco xr : "admin show environment fan" ,"admin sh…
…ow vm" and "show version" (#264) * added template for cisco xr : admin show environment fan * Added template for cisco xr: admin show vm command * added template for cisco xr: show version command * Update templates to use more generic '\S+'
- Loading branch information
1 parent
4548610
commit 9105925
Showing
10 changed files
with
432 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
Value MODULE (\S+) | ||
Value TYPE (\S+) | ||
Value List FAN_SPEED (\d+) | ||
|
||
Start | ||
^.+UTC | ||
^=+ | ||
^\s+Fan\s+speed\s+\(rpm\)\s*$$ | ||
^Location\s+FRU\s+Type.+FAN_\d | ||
^\s+FAN_.+$$ | ||
^-+ -> FM | ||
^\s*$$ | ||
^.* -> Error "LINE NOT FOUND" | ||
|
||
FM | ||
^${MODULE}\s+${TYPE}\s+${FAN_SPEED}\s*$$ -> Record | ||
^${MODULE}\s+${TYPE}\s+${FAN_SPEED} -> Continue | ||
^${MODULE}\s+${TYPE}\s+\d+\s+${FAN_SPEED}\s*$$ -> Record | ||
^${MODULE}\s+${TYPE}\s+\d+\s+${FAN_SPEED} -> Continue | ||
^${MODULE}\s+${TYPE}\s+(?:\d+\s+){2}${FAN_SPEED}\s*$$ -> Record | ||
^${MODULE}\s+${TYPE}\s+(?:\d+\s+){2}${FAN_SPEED} -> Continue | ||
^${MODULE}\s+${TYPE}\s+(?:\d+\s+){3}${FAN_SPEED}\s*$$ -> Record | ||
^${MODULE}\s+${TYPE}\s+(?:\d+\s+){3}${FAN_SPEED} -> Continue | ||
^${MODULE}\s+${TYPE}\s+(?:\d+\s+){4}${FAN_SPEED}\s*$$ -> Record | ||
^${MODULE}\s+${TYPE}\s+(?:\d+\s+){4}${FAN_SPEED} -> Continue | ||
^${MODULE}\s+${TYPE}\s+(?:\d+\s+){5}${FAN_SPEED} | ||
^\s+${FAN_SPEED}\s*$$ -> Record | ||
^\s+${FAN_SPEED} -> Continue | ||
^\s+\d+\s+${FAN_SPEED}\s*$$ -> Record | ||
^\s+\d+\s+${FAN_SPEED} -> Continue | ||
^(?:\s+\d+\s+){2}${FAN_SPEED}\s*$$ -> Record | ||
^(?:\s+\d+\s+){2}${FAN_SPEED} -> Continue | ||
^(?:\s+\d+\s+){3}${FAN_SPEED}\s*$$ -> Record | ||
^(?:\s+\d+\s+){3}${FAN_SPEED} -> Continue | ||
^(?:\s+\d+\s+){4}${FAN_SPEED}\s*$$ -> Record | ||
^(?:\s+\d+\s+){4}${FAN_SPEED} -> Continue | ||
^(?:\s+\d+\s+){5}${FAN_SPEED} -> Record | ||
^\s*$$ | ||
^.* -> Error "LINE NOT FOUND" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Value Filldown LOCATION (\S+) | ||
Value ID (\S+) | ||
Value Required STATUS (\S+) | ||
Value Required IP_ADDR (\S+) | ||
Value HB_SENT (\S+) | ||
Value HB_RECV (\S+) | ||
|
||
Start | ||
^.+UTC | ||
^Location:\s${LOCATION} | ||
^Id\s+Status\s+IP\sAddress\s+HB\sSent/Recv | ||
^-+ -> Loc | ||
^\s+$$ | ||
^$$ | ||
^.* -> Error "LINE NOT FOUND" | ||
|
||
Loc | ||
^${ID}\s+${STATUS}\s+${IP_ADDR}\s+${HB_SENT}\/${HB_RECV} -> Record | ||
^\s+$$ | ||
^$$ -> Start | ||
^.* -> Error "LINE NOT FOUND" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Value VERSION (\S+) | ||
Value UPTIME (.+) | ||
Value LOCATION (\S+) | ||
Value HARDWARE (\S+) | ||
Value BUILD_HOST (\S+) | ||
|
||
Start | ||
^.+UTC | ||
^Cisco.+Software.+Version.+ | ||
^Copyright\s\(c\).+ | ||
^Build\s+Information: -> Build_Info | ||
^[Cc]isco\s${HARDWARE}\s.+ | ||
^System\suptime\sis\s${UPTIME} -> Record | ||
^\s+$$ | ||
^$$ | ||
^.* -> Error "Line not found" | ||
|
||
Build_Info | ||
^\s+Built\sBy.+ | ||
^\s+Built\sOn.+ | ||
^\s+Build\sHost\s+:\s+${BUILD_HOST} | ||
^\s+Workspace\s+:\s\S+ | ||
^\s+Version\s+:\s${VERSION} | ||
^\s+Location\s+:\s${LOCATION} | ||
^$$ -> Start | ||
^\s+$$ | ||
^$$ | ||
^.* -> Error "Line not found" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
tests/cisco_xr/admin_show_environment_fan/cisco_xr_admin_show_environment_fan.parsed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
parsed_sample: | ||
- module : '0/FT0' | ||
type : 'NC55-5516-FAN' | ||
fan_speed : ['6192', '3870', '6214', '3859', '6257', '3857', '6420', '4029', '6390', '3938', '6467', '4066'] | ||
- module : '0/FT1' | ||
type : 'NC55-5516-FAN' | ||
fan_speed : ['6360', '3970', '6143', '3824', '6033', '3750', '6279', '3859', '6060', '3721', '6375', '3964'] | ||
- module : '0/FT2' | ||
type : 'NC55-5516-FAN' | ||
fan_speed : ['6545', '4014', '6474', '3994', '6000', '3752', '6375', '4002', '5921', '3698', '6308', '3915'] | ||
- module : '0/PM0' | ||
type : 'NC55-PWR-3KW-AC' | ||
fan_speed : ['8021', '8537'] | ||
- module : '0/PM1' | ||
type : 'NC55-PWR-3KW-AC' | ||
fan_speed : ['8064', '8387'] | ||
- module : '0/PM2' | ||
type : 'NC55-PWR-3KW-AC' | ||
fan_speed : ['8064', '8473'] | ||
- module : '0/PM3' | ||
type : 'NC55-PWR-3KW-AC' | ||
fan_speed : ['7978', '8537'] | ||
- module : '0/PM4' | ||
type : 'NC55-PWR-3KW-AC' | ||
fan_speed : ['8064', '8473'] | ||
- module : '0/PM5' | ||
type : 'NC55-PWR-3KW-AC' | ||
fan_speed : ['8086', '8451'] | ||
- module : '0/PM6' | ||
type : 'NC55-PWR-3KW-AC' | ||
fan_speed : ['8086', '8537'] | ||
- module : '0/PM7' | ||
type : 'NC55-PWR-3KW-AC' | ||
fan_speed : ['7978', '8473'] | ||
- module : '0/PM8' | ||
type : 'NC55-PWR-3KW-AC' | ||
fan_speed : ['8000', '8516'] | ||
- module : '0/PM9' | ||
type : 'NC55-PWR-3KW-AC' | ||
fan_speed : ['8021', '8516'] |
33 changes: 33 additions & 0 deletions
33
tests/cisco_xr/admin_show_environment_fan/cisco_xr_admin_show_environment_fan.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Sat Mar 10 14:03:31.155 UTC | ||
=============================================================================== | ||
Fan speed (rpm) | ||
Location FRU Type FAN_0 FAN_1 FAN_2 FAN_3 FAN_4 FAN_5 | ||
FAN_6 FAN_7 FAN_8 FAN_9 FAN_10 FAN_11 | ||
------------------------------------------------------------------------------- | ||
0/FT0 NC55-5516-FAN 6192 3870 6214 3859 6257 3857 | ||
6420 4029 6390 3938 6467 4066 | ||
0/FT1 NC55-5516-FAN 6360 3970 6143 3824 6033 3750 | ||
6279 3859 6060 3721 6375 3964 | ||
0/FT2 NC55-5516-FAN 6545 4014 6474 3994 6000 3752 | ||
6375 4002 5921 3698 6308 3915 | ||
|
||
0/PM0 NC55-PWR-3KW-AC 8021 8537 | ||
|
||
0/PM1 NC55-PWR-3KW-AC 8064 8387 | ||
|
||
0/PM2 NC55-PWR-3KW-AC 8064 8473 | ||
|
||
0/PM3 NC55-PWR-3KW-AC 7978 8537 | ||
|
||
0/PM4 NC55-PWR-3KW-AC 8064 8473 | ||
|
||
0/PM5 NC55-PWR-3KW-AC 8086 8451 | ||
|
||
0/PM6 NC55-PWR-3KW-AC 8086 8537 | ||
|
||
0/PM7 NC55-PWR-3KW-AC 7978 8473 | ||
|
||
0/PM8 NC55-PWR-3KW-AC 8000 8516 | ||
|
||
0/PM9 NC55-PWR-3KW-AC 8021 8516 | ||
|
163 changes: 163 additions & 0 deletions
163
tests/cisco_xr/admin_show_vm/cisco_xr_admin_show_vm.parsed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
--- | ||
|
||
parsed_sample: | ||
|
||
|
||
- id : 'sysadmin' | ||
location : '0/0' | ||
hb_sent : 'NA' | ||
hb_recv : 'NA' | ||
ip_addr : '192.0.4.1' | ||
status : 'running' | ||
|
||
|
||
- id : 'default-sdr' | ||
location : '0/0' | ||
hb_sent : '293478' | ||
hb_recv : '293478' | ||
ip_addr : '192.0.4.3' | ||
status : 'running' | ||
|
||
|
||
- id : 'sysadmin' | ||
location : '0/1' | ||
hb_sent : 'NA' | ||
hb_recv : 'NA' | ||
ip_addr : '192.0.8.1' | ||
status : 'running' | ||
|
||
|
||
- id : 'default-sdr' | ||
location : '0/1' | ||
hb_sent : '293478' | ||
hb_recv : '293478' | ||
ip_addr : '192.0.8.3' | ||
status : 'running' | ||
|
||
|
||
- id : 'sysadmin' | ||
location : '0/2' | ||
hb_sent : 'NA' | ||
hb_recv : 'NA' | ||
ip_addr : '192.0.12.1' | ||
status : 'running' | ||
|
||
|
||
- id : 'default-sdr' | ||
location : '0/2' | ||
hb_sent : '293478' | ||
hb_recv : '293478' | ||
ip_addr : '192.0.12.3' | ||
status : 'running' | ||
|
||
|
||
- id : 'sysadmin' | ||
location : '0/3' | ||
hb_sent : 'NA' | ||
hb_recv : 'NA' | ||
ip_addr : '192.0.16.1' | ||
status : 'running' | ||
|
||
|
||
- id : 'default-sdr' | ||
location : '0/3' | ||
hb_sent : '293478' | ||
hb_recv : '293478' | ||
ip_addr : '192.0.16.3' | ||
status : 'running' | ||
|
||
|
||
- id : 'sysadmin' | ||
location : '0/4' | ||
hb_sent : 'NA' | ||
hb_recv : 'NA' | ||
ip_addr : '192.0.20.1' | ||
status : 'running' | ||
|
||
|
||
- id : 'default-sdr' | ||
location : '0/4' | ||
hb_sent : '293478' | ||
hb_recv : '293478' | ||
ip_addr : '192.0.20.3' | ||
status : 'running' | ||
|
||
|
||
- id : 'sysadmin' | ||
location : '0/FC0' | ||
hb_sent : 'NA' | ||
hb_recv : 'NA' | ||
ip_addr : '192.0.84.1' | ||
status : 'running' | ||
|
||
|
||
- id : 'sysadmin' | ||
location : '0/FC1' | ||
hb_sent : 'NA' | ||
hb_recv : 'NA' | ||
ip_addr : '192.0.88.1' | ||
status : 'running' | ||
|
||
|
||
- id : 'sysadmin' | ||
location : '0/FC2' | ||
hb_sent : 'NA' | ||
hb_recv : 'NA' | ||
ip_addr : '192.0.92.1' | ||
status : 'running' | ||
|
||
|
||
- id : 'sysadmin' | ||
location : '0/FC3' | ||
hb_sent : 'NA' | ||
hb_recv : 'NA' | ||
ip_addr : '192.0.96.1' | ||
status : 'running' | ||
|
||
|
||
- id : 'sysadmin' | ||
location : '0/FC4' | ||
hb_sent : 'NA' | ||
hb_recv : 'NA' | ||
ip_addr : '192.0.100.1' | ||
status : 'running' | ||
|
||
|
||
- id : 'sysadmin' | ||
location : '0/FC5' | ||
hb_sent : 'NA' | ||
hb_recv : 'NA' | ||
ip_addr : '192.0.104.1' | ||
status : 'running' | ||
|
||
|
||
- id : 'sysadmin' | ||
location : '0/RP0' | ||
hb_sent : 'NA' | ||
hb_recv : 'NA' | ||
ip_addr : '192.0.108.1' | ||
status : 'running' | ||
|
||
|
||
- id : 'default-sdr' | ||
location : '0/RP0' | ||
hb_sent : '5869560' | ||
hb_recv : '5869560' | ||
ip_addr : '192.0.108.4' | ||
status : 'running' | ||
|
||
|
||
- id : 'sysadmin' | ||
location : '0/SC0' | ||
hb_sent : 'NA' | ||
hb_recv : 'NA' | ||
ip_addr : '192.0.116.1' | ||
status : 'running' | ||
|
||
|
||
- id : 'sysadmin' | ||
location : '0/SC1' | ||
hb_sent : 'NA' | ||
hb_recv : 'NA' | ||
ip_addr : '192.0.120.1' | ||
status : 'running' |
Oops, something went wrong.