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

Fortinet 'execute date' template #1481

Merged
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 8 additions & 0 deletions ntc_templates/templates/fortinet_execute_date.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Value YEAR (\d{4})
Value MONTH (\d{2})
Value DAY (\d{2})

Start
^\s*current\s+date\s+is:\s+${YEAR}-${MONTH}-${DAY}\s*$$ -> Record
^\s*$$
^. -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,7 @@ fortinet_get_system_interface.textfsm, .*, fortinet, g[[et]] sy[[stem]] in[[terf
fortinet_get_system_status.textfsm, .*, fortinet, g[[et]] sy[[stem]] stat[[us]]
fortinet_get_hardware_nic.textfsm, .*, fortinet, g[[et]] hard[[ware]] n[[ic]]
fortinet_get_system_arp.textfsm, .*, fortinet, g[[et]] sy[[stem]] arp
fortinet_execute_date.textfsm, .*, fortinet, exec[[ute]] da[[te]]
fortinet_execute_ping.textfsm, .*, fortinet, exec[[ute]] ping
fortinet_execute_time.textfsm, .*, fortinet, exec[[ute]] ti[[me]]

Expand Down
1 change: 1 addition & 0 deletions tests/fortinet/execute_date/fortinet_execute_date.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
current date is: 2023-08-07
5 changes: 5 additions & 0 deletions tests/fortinet/execute_date/fortinet_execute_date.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
parsed_sample:
- year: "2023"
month: "08"
day: "07"
Loading