From 80eb70c6472e60261568a8d5594241dedd9377af Mon Sep 17 00:00:00 2001 From: Pavlo Skliarenko Date: Wed, 4 Sep 2024 14:29:36 +0100 Subject: [PATCH] Output starts with '.' --- ntc_templates/templates/cisco_ios_show_clock.textfsm | 2 +- tests/cisco_ios/show_clock/cisco_ios_show_clock_2.raw | 1 + tests/cisco_ios/show_clock/cisco_ios_show_clock_2.yml | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 tests/cisco_ios/show_clock/cisco_ios_show_clock_2.raw create mode 100644 tests/cisco_ios/show_clock/cisco_ios_show_clock_2.yml diff --git a/ntc_templates/templates/cisco_ios_show_clock.textfsm b/ntc_templates/templates/cisco_ios_show_clock.textfsm index 384f47af16..d9f7ee6bf8 100644 --- a/ntc_templates/templates/cisco_ios_show_clock.textfsm +++ b/ntc_templates/templates/cisco_ios_show_clock.textfsm @@ -6,7 +6,7 @@ Value DAY (\d+) Value YEAR (\d+) Start - ^[\*]?${TIME}\s${TIMEZONE}\s${DAYWEEK}\s${MONTH}\s${DAY}\s${YEAR} -> Record + ^\s*(\*)?\.?${TIME}\s${TIMEZONE}\s${DAYWEEK}\s${MONTH}\s${DAY}\s${YEAR} -> Record # Capture time-stamp if vty line has command time-stamping turned on ^Load\s+for\s+ ^Time\s+source\s+is diff --git a/tests/cisco_ios/show_clock/cisco_ios_show_clock_2.raw b/tests/cisco_ios/show_clock/cisco_ios_show_clock_2.raw new file mode 100644 index 0000000000..9e3ba6f361 --- /dev/null +++ b/tests/cisco_ios/show_clock/cisco_ios_show_clock_2.raw @@ -0,0 +1 @@ +.18:57:38.347 UTC Mon Oct 19 2015 diff --git a/tests/cisco_ios/show_clock/cisco_ios_show_clock_2.yml b/tests/cisco_ios/show_clock/cisco_ios_show_clock_2.yml new file mode 100644 index 0000000000..eae6a5fb04 --- /dev/null +++ b/tests/cisco_ios/show_clock/cisco_ios_show_clock_2.yml @@ -0,0 +1,8 @@ +--- +parsed_sample: + - time: "18:57:38.347" + timezone: "UTC" + dayweek: "Mon" + month: "Oct" + day: "19" + year: "2015"