Skip to content

Commit

Permalink
cisco_nxos_dir: New template
Browse files Browse the repository at this point in the history
  • Loading branch information
lamiskin committed Jan 10, 2024
1 parent 29283a6 commit d07c9c2
Show file tree
Hide file tree
Showing 5 changed files with 260 additions and 0 deletions.
18 changes: 18 additions & 0 deletions ntc_templates/templates/cisco_nxos_dir.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Value SIZE (\d+)
Value DATE_TIME (\w+\s+\d+\s+\d+\:\d+\:\d+\s+\d+)
Value ITEM_NAME (\S+)
Value Fillup TOTAL_SIZE (\d+)
Value Fillup TOTAL_FREE (\d+)
Value Fillup TOTAL_USED (\d+)
Value Fillup FILE_SYSTEM (\w+)

Start
^Input\/output\s+error
^\s*${SIZE}\s+${DATE_TIME}\s+${ITEM_NAME} -> Record
^\s*Usage\s+for\s+${FILE_SYSTEM}://
^\s*${TOTAL_USED}\s+bytes\s+used
^\s*${TOTAL_FREE}\s+bytes\s+free
^\s*${TOTAL_SIZE}\s+bytes\s+total
^.+ -> Error

EOF
13 changes: 13 additions & 0 deletions tests/cisco_nxos/dir/cisco_nxos_dir_01.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Input/output error
4096 Sep 22 15:27:34 2019 .rpmstore/
4096 Sep 22 15:27:53 2019 .swtam/
1982 Sep 22 15:29:22 2019 20190922_052903_poap_7826_init.log
189080 Sep 22 15:18:11 2019 CpuUsage.Log
1410981963 Jul 13 10:05:48 2018 aci-n9000-dk9.13.1.2p.bin
1157861451 Sep 22 15:15:57 2019 auto-s
0 Sep 22 15:16:00 2019 bios_bootup_scratch_not_cleared
0 Sep 22 15:27:47 2019 bootflash_sync_list
53 Sep 22 15:10:02 2019 disk_log.txt
18 Dec 12 22:32:13 2022 gold_file
462 Sep 22 15:18:02 2019 libmon.logs
4096 Sep 22 15:02:17 2019 lost+found/
86 changes: 86 additions & 0 deletions tests/cisco_nxos/dir/cisco_nxos_dir_01.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
parsed_sample:
- size: "4096"
date_time: "Sep 22 15:27:34 2019"
item_name: ".rpmstore/"
total_size: ""
total_free: ""
total_used: ""
file_system: ""
- size: "4096"
date_time: "Sep 22 15:27:53 2019"
item_name: ".swtam/"
total_size: ""
total_free: ""
total_used: ""
file_system: ""
- size: "1982"
date_time: "Sep 22 15:29:22 2019"
item_name: "20190922_052903_poap_7826_init.log"
total_size: ""
total_free: ""
total_used: ""
file_system: ""
- size: "189080"
date_time: "Sep 22 15:18:11 2019"
item_name: "CpuUsage.Log"
total_size: ""
total_free: ""
total_used: ""
file_system: ""
- size: "1410981963"
date_time: "Jul 13 10:05:48 2018"
item_name: "aci-n9000-dk9.13.1.2p.bin"
total_size: ""
total_free: ""
total_used: ""
file_system: ""
- size: "1157861451"
date_time: "Sep 22 15:15:57 2019"
item_name: "auto-s"
total_size: ""
total_free: ""
total_used: ""
file_system: ""
- size: "0"
date_time: "Sep 22 15:16:00 2019"
item_name: "bios_bootup_scratch_not_cleared"
total_size: ""
total_free: ""
total_used: ""
file_system: ""
- size: "0"
date_time: "Sep 22 15:27:47 2019"
item_name: "bootflash_sync_list"
total_size: ""
total_free: ""
total_used: ""
file_system: ""
- size: "53"
date_time: "Sep 22 15:10:02 2019"
item_name: "disk_log.txt"
total_size: ""
total_free: ""
total_used: ""
file_system: ""
- size: "18"
date_time: "Dec 12 22:32:13 2022"
item_name: "gold_file"
total_size: ""
total_free: ""
total_used: ""
file_system: ""
- size: "462"
date_time: "Sep 22 15:18:02 2019"
item_name: "libmon.logs"
total_size: ""
total_free: ""
total_used: ""
file_system: ""
- size: "4096"
date_time: "Sep 22 15:02:17 2019"
item_name: "lost+found/"
total_size: ""
total_free: ""
total_used: ""
file_system: ""
22 changes: 22 additions & 0 deletions tests/cisco_nxos/dir/cisco_nxos_dir_02.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
4096 Nov 18 15:29:15 2017 .patch/
4096 Jun 28 21:35:36 2021 .snapshots/
196358 Mar 10 17:15:18 2020 capture_auto_capture.tgz
4096 Nov 18 15:29:15 2017 fault-management-logs/
70076928 Apr 24 17:25:03 2018 flash:
1801 Nov 18 15:49:06 2017 license_JPA21G_36.lic
4096 Sep 23 10:04:15 2019 lost+found/
538255348 Jan 31 16:57:56 2021 n7700-s2-dk9.8.4.3.bin
64396288 Jan 31 17:26:12 2021 n7700-s2-kickstart.8.4.3.bin
4096 Nov 18 15:30:32 2017 scripts/
18788554 Jun 29 12:59:57 2021 showtech_mpls_ldp_202106291259
4096 Sep 10 15:01:42 2019 sup-2/
2813192 Sep 01 08:35:52 2021 tech_bgp.txt
87673293 Apr 18 09:34:13 2019 tech_mod15.txt
41525 Jul 06 09:08:35 2020 tftp
4096 Nov 18 15:29:15 2017 vdc_2/
4096 Nov 18 15:29:17 2017 virtual-instance/

Usage for bootflash://
1531203584 bytes used
2166267904 bytes free
3697471488 bytes total
121 changes: 121 additions & 0 deletions tests/cisco_nxos/dir/cisco_nxos_dir_02.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
---
parsed_sample:
- size: "4096"
date_time: "Nov 18 15:29:15 2017"
item_name: ".patch/"
total_size: "3697471488"
total_free: "2166267904"
total_used: "1531203584"
file_system: "bootflash"
- size: "4096"
date_time: "Jun 28 21:35:36 2021"
item_name: ".snapshots/"
total_size: "3697471488"
total_free: "2166267904"
total_used: "1531203584"
file_system: "bootflash"
- size: "196358"
date_time: "Mar 10 17:15:18 2020"
item_name: "capture_auto_capture.tgz"
total_size: "3697471488"
total_free: "2166267904"
total_used: "1531203584"
file_system: "bootflash"
- size: "4096"
date_time: "Nov 18 15:29:15 2017"
item_name: "fault-management-logs/"
total_size: "3697471488"
total_free: "2166267904"
total_used: "1531203584"
file_system: "bootflash"
- size: "70076928"
date_time: "Apr 24 17:25:03 2018"
item_name: "flash:"
total_size: "3697471488"
total_free: "2166267904"
total_used: "1531203584"
file_system: "bootflash"
- size: "1801"
date_time: "Nov 18 15:49:06 2017"
item_name: "license_JPA21G_36.lic"
total_size: "3697471488"
total_free: "2166267904"
total_used: "1531203584"
file_system: "bootflash"
- size: "4096"
date_time: "Sep 23 10:04:15 2019"
item_name: "lost+found/"
total_size: "3697471488"
total_free: "2166267904"
total_used: "1531203584"
file_system: "bootflash"
- size: "538255348"
date_time: "Jan 31 16:57:56 2021"
item_name: "n7700-s2-dk9.8.4.3.bin"
total_size: "3697471488"
total_free: "2166267904"
total_used: "1531203584"
file_system: "bootflash"
- size: "64396288"
date_time: "Jan 31 17:26:12 2021"
item_name: "n7700-s2-kickstart.8.4.3.bin"
total_size: "3697471488"
total_free: "2166267904"
total_used: "1531203584"
file_system: "bootflash"
- size: "4096"
date_time: "Nov 18 15:30:32 2017"
item_name: "scripts/"
total_size: "3697471488"
total_free: "2166267904"
total_used: "1531203584"
file_system: "bootflash"
- size: "18788554"
date_time: "Jun 29 12:59:57 2021"
item_name: "showtech_mpls_ldp_202106291259"
total_size: "3697471488"
total_free: "2166267904"
total_used: "1531203584"
file_system: "bootflash"
- size: "4096"
date_time: "Sep 10 15:01:42 2019"
item_name: "sup-2/"
total_size: "3697471488"
total_free: "2166267904"
total_used: "1531203584"
file_system: "bootflash"
- size: "2813192"
date_time: "Sep 01 08:35:52 2021"
item_name: "tech_bgp.txt"
total_size: "3697471488"
total_free: "2166267904"
total_used: "1531203584"
file_system: "bootflash"
- size: "87673293"
date_time: "Apr 18 09:34:13 2019"
item_name: "tech_mod15.txt"
total_size: "3697471488"
total_free: "2166267904"
total_used: "1531203584"
file_system: "bootflash"
- size: "41525"
date_time: "Jul 06 09:08:35 2020"
item_name: "tftp"
total_size: "3697471488"
total_free: "2166267904"
total_used: "1531203584"
file_system: "bootflash"
- size: "4096"
date_time: "Nov 18 15:29:15 2017"
item_name: "vdc_2/"
total_size: "3697471488"
total_free: "2166267904"
total_used: "1531203584"
file_system: "bootflash"
- size: "4096"
date_time: "Nov 18 15:29:17 2017"
item_name: "virtual-instance/"
total_size: "3697471488"
total_free: "2166267904"
total_used: "1531203584"
file_system: "bootflash"

0 comments on commit d07c9c2

Please sign in to comment.