diff --git a/ntc_templates/templates/fortinet_execute_date.textfsm b/ntc_templates/templates/fortinet_execute_date.textfsm new file mode 100644 index 0000000000..4563084e05 --- /dev/null +++ b/ntc_templates/templates/fortinet_execute_date.textfsm @@ -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 diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index f7293099d6..e1fcd900a4 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -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]] diff --git a/tests/fortinet/execute_date/fortinet_execute_date.raw b/tests/fortinet/execute_date/fortinet_execute_date.raw new file mode 100644 index 0000000000..ab89397aee --- /dev/null +++ b/tests/fortinet/execute_date/fortinet_execute_date.raw @@ -0,0 +1 @@ +current date is: 2023-08-07 diff --git a/tests/fortinet/execute_date/fortinet_execute_date.yml b/tests/fortinet/execute_date/fortinet_execute_date.yml new file mode 100644 index 0000000000..e68ea3603f --- /dev/null +++ b/tests/fortinet/execute_date/fortinet_execute_date.yml @@ -0,0 +1,5 @@ +--- +parsed_sample: + - year: "2023" + month: "08" + day: "07"