Skip to content

Commit

Permalink
adding
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandeepsr committed Feb 25, 2018
1 parent c5c05ec commit 8c43760
Show file tree
Hide file tree
Showing 7 changed files with 209 additions and 0 deletions.
20 changes: 20 additions & 0 deletions templates/arista_eos_bash_df_-h.template
@@ -0,0 +1,20 @@
Value FILE_SYSTEM (\S+)
Value SIZE (\S+)
Value USED (\S+)
Value AVAIL (\S+)
Value USE_PERCENT (\S+)
Value MOUNTED_ON (\S+)

Start
^Filesystem.*Mounted on$$ -> Data
^\s+$$
^$$
^.* -> Error "LINE NOT FOUND"

Data
^${FILE_SYSTEM}\s+${SIZE}\s+${USED}\s+${AVAIL}\s+${USE_PERCENT}\s+${MOUNTED_ON} -> Record
^\s+$$
^$$
^.* -> Error "LINE NOT FOUND"

EOF
42 changes: 42 additions & 0 deletions templates/arista_eos_show_reload_cause.template
@@ -0,0 +1,42 @@
Value RELOAD_CAUSE (.+)
Value RELOAD_TIME (.+)
Value RECOMMENDED_ACTION (.+)
Value DEBUG_INFO (.+)


Start
^Reload Cause 1:
^--.+
^${RELOAD_CAUSE} -> RT
^\s+$$
^$$
^.* -> Error "LINE NOT FOUND"

RT
^\s+
^Reload Time:
^--.+
^${RELOAD_TIME} -> RA
^\s+$$
^$$
^.* -> Error "LINE NOT FOUND"

RA
^\s+
^Recommended Action:
^--.+
^${RECOMMENDED_ACTION} -> DI
^\s+$$
^$$
^.* -> Error "LINE NOT FOUND"

DI
^\s+
^Debugging Information:
^--.+
^${DEBUG_INFO} -> Record
^\s+$$
^$$
^.* -> Error "LINE NOT FOUND"

EOF
2 changes: 2 additions & 0 deletions templates/index
Expand Up @@ -27,6 +27,7 @@ arista_eos_show_ip_bgp_summary.template, .*, arista_eos, sh[[ow]] i[[p]] bg[[p]]
arista_eos_show_isis_neighbors.template, .*, arista_eos, sh[[ow]] isis ne[[ighbors]]
arista_eos_show_lldp_neighbors.template, .*, arista_eos, sh[[ow]] ll[[dp]] nei[[ghbors]]
arista_eos_show_snmp_community.template, .*, arista_eos, sh[[ow]] sn[[mp]] com[[munity]]
arista_eos_show_reload_cause.template, .*, arista_eos, sh[[ow]] relo[[ad]] ca[[use]]
arista_eos_show_boot-config.template, .*, arista_eos, sh[[ow]] boot-c[[onfig]]
arista_eos_show_interfaces.template, .*, arista_eos, sh[[ow]] inte[[rfaces]]
arista_eos_show_inventory.template, .*, arista_eos, sh[[ow]] inv[[entory]]
Expand All @@ -35,6 +36,7 @@ arista_eos_show_ip_route.template, .*, arista_eos, sh[[ow]] i[[p]] rou[[te]]
arista_eos_show_version.template, .*, arista_eos, sh[[ow]] ver[[sion]]
arista_eos_show_ip_arp.template, .*, arista_eos, sh[[ow]] i[[p]] ar[[p]]
arista_eos_show_ip_bgp.template, .*, arista_eos, sh[[ow]] i[[p]] bg[[p]]
arista_eos_bash_df_-h.template, .*, arista_eos, bas[[h]] d[[f]] [[-h]]
arista_eos_show_clock.template, .*, arista_eos, sh[[ow]] clo[[ck]]
arista_eos_show_mlag.template, .*, arista_eos, sh[[ow]] ml[[ag]]
arista_eos_show_vlan.template, .*, arista_eos, sh[[ow]] vl[[an]]
Expand Down
107 changes: 107 additions & 0 deletions tests/arista_eos/bash_df_-h/arista_eos_bash_df_-h.parsed
@@ -0,0 +1,107 @@
---

parsed_sample:


- avail : '4.5G'
used : '44M'
size : '4.6G'
mounted_on : '/'
file_system : 'none'
use_percent : '1%'


- avail : '4.5G'
used : '44M'
size : '4.6G'
mounted_on : '/.overlay'
file_system : 'none'
use_percent : '1%'


- avail : '8.0M'
used : '0'
size : '8.0M'
mounted_on : '/dev'
file_system : 'devtmpfs'
use_percent : '0%'


- avail : '16G'
used : '0'
size : '16G'
mounted_on : '/dev/shm'
file_system : 'tmpfs'
use_percent : '0%'


- avail : '16G'
used : '4.4M'
size : '16G'
mounted_on : '/run'
file_system : 'tmpfs'
use_percent : '1%'


- avail : '16G'
used : '0'
size : '16G'
mounted_on : '/sys/fs/cgroup'
file_system : 'tmpfs'
use_percent : '0%'


- avail : '4.6G'
used : '308K'
size : '4.6G'
mounted_on : '/tmp'
file_system : 'tmpfs'
use_percent : '1%'


- avail : '63M'
used : '1.2M'
size : '64M'
mounted_on : '/.deltas'
file_system : 'tmpfs'
use_percent : '2%'


- avail : '16G'
used : '0'
size : '16G'
mounted_on : '/var/run/netns'
file_system : 'tmpfs'
use_percent : '0%'


- avail : '3.1G'
used : '0'
size : '3.1G'
mounted_on : '/var/core'
file_system : 'tmpfs'
use_percent : '0%'


- avail : '3.0G'
used : '93M'
size : '3.1G'
mounted_on : '/var/log'
file_system : 'tmpfs'
use_percent : '3%'


- avail : '807M'
used : '218M'
size : '1.0G'
mounted_on : '/var/shmem'
file_system : 'tmpfs'
use_percent : '22%'


- avail : '2.2G'
used : '1.2G'
size : '3.3G'
mounted_on : '/mnt/flash'
file_system : '/dev/sda1'
use_percent : '35%'
14 changes: 14 additions & 0 deletions tests/arista_eos/bash_df_-h/arista_eos_bash_df_-h.raw
@@ -0,0 +1,14 @@
Filesystem Size Used Avail Use% Mounted on
none 4.6G 44M 4.5G 1% /
none 4.6G 44M 4.5G 1% /.overlay
devtmpfs 8.0M 0 8.0M 0% /dev
tmpfs 16G 0 16G 0% /dev/shm
tmpfs 16G 4.4M 16G 1% /run
tmpfs 16G 0 16G 0% /sys/fs/cgroup
tmpfs 4.6G 308K 4.6G 1% /tmp
tmpfs 64M 1.2M 63M 2% /.deltas
tmpfs 16G 0 16G 0% /var/run/netns
tmpfs 3.1G 0 3.1G 0% /var/core
tmpfs 3.1G 93M 3.0G 3% /var/log
tmpfs 1.0G 218M 807M 22% /var/shmem
/dev/sda1 3.3G 1.2G 2.2G 35% /mnt/flash
@@ -0,0 +1,9 @@
---

parsed_sample:


- recommended_action : 'No action necessary.'
debug_info : 'None available.'
reload_cause : 'The system rebooted due to a Power Loss'
reload_time : 'Reload occurred at Fri Feb 23 14:18:49 2018 UTC.'
@@ -0,0 +1,15 @@
Reload Cause 1:
-------------------
The system rebooted due to a Power Loss

Reload Time:
------------
Reload occurred at Fri Feb 23 14:18:49 2018 UTC.

Recommended Action:
-------------------
No action necessary.

Debugging Information:
----------------------
None available.

0 comments on commit 8c43760

Please sign in to comment.