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 2 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 @@ -498,6 +498,7 @@ fortinet_get_system_ha_status.textfsm, .*, fortinet, g[[et]] sy[[stem]] ha s[[ta
fortinet_get_system_interface.textfsm, .*, fortinet, g[[et]] sy[[stem]] in[[terface]]
fortinet_get_system_status.textfsm, .*, fortinet, g[[et]] sy[[stem]] stat[[us]]
fortinet_get_system_arp.textfsm, .*, fortinet, g[[et]] sy[[stem]] arp
fortinet_execute_date.textfsm, .*, fortinet, exec[[ute]] da[[te]]

hp_comware_display_lldp_neighbor-information_verbose.textfsm, .*, hp_comware, di[[splay]] ll[[dp]] n[[eighbor-information]] v[[erbose]]
hp_comware_display_lldp_neighbor-information_list.textfsm, .*, hp_comware, di[[splay]] ll[[dp]] n[[eighbor-information]] l[[ist]]
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"