Skip to content

Add Huawei VRP display ntp status template #2103

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
27 changes: 27 additions & 0 deletions ntc_templates/templates/huawei_vrp_display_ntp_status.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Value CLOCK_STATUS (\w+)
Value CLOCK_STRATUM (\d+)
Value REFERENCE_CLOCK_ID (\S+)
Value NOMINAL_FREQUENCY (\S+\s+\S+)
Value ACTUAL_FREQUENCY (\S+\s+\S+)
Value CLOCK_PRECISION (\S+)
Value CLOCK_OFFSET (\S+\s+\S+)
Value CLOCK_DELAY (\S+\s+\S+)
Value ROOT_DISPERSION (\S+\s+\S+)
Value PEER_DISPERSION (\S+\s+\S+)
Value REFERENCE_TIME (.*)
Value SYNCHRONIZATION_STATE (\w+\s+\w+)

Start
^\s+clock\s+status:\s+${CLOCK_STATUS}
^\s+clock\s+stratum:\s+${CLOCK_STRATUM}
^\s+reference\s+clock\s+ID:\s+${REFERENCE_CLOCK_ID}
^\s+nominal\s+frequency:\s+${NOMINAL_FREQUENCY}
^\s+actual\s+frequency:\s+${ACTUAL_FREQUENCY}
^\s+clock\s+precision:\s+${CLOCK_PRECISION}
^\s+clock\s+offset:\s+${CLOCK_OFFSET}
^\s+root\s+delay:\s+${CLOCK_DELAY}
^\s+root\s+dispersion:\s+${ROOT_DISPERSION}
^\s+peer\s+dispersion:\s+${PEER_DISPERSION}
^\s+reference\s+time:\s+${REFERENCE_TIME}
^\s+synchronization\s+state:\s+${SYNCHRONIZATION_STATE}
^. -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,7 @@ huawei_vrp_display_http_server.textfsm, .*, huawei_vrp, di[[splay]] h[[ttp]] s[[
huawei_vrp_display_mac-address.textfsm, .*, huawei_vrp, disp[[lay]] mac[[-address]]
huawei_vrp_display_temperature.textfsm, .*, huawei_vrp, dis[[play]] tem[[perature]]
huawei_vrp_display_nat_server.textfsm, .*, huawei_vrp, dis[[play]] na[[t]] ser[[ver]]
huawei_vrp_display_ntp_status.textfsm, .*, huawei_vrp, d[[isplay]] nt[[p]] st[[atus]]
huawei_vrp_display_sn_license.textfsm, .*, huawei_vrp, dis[[play]] sn l[[icence]]
huawei_vrp_display_arp_brief.textfsm, .*, huawei_vrp, dis[[play]] arp br[[ief]]
huawei_vrp_display_interface.textfsm, .*, huawei_vrp, dis[[play]] inter[[face]]\s*((?!brief|counters|description).)*$
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
clock status: synchronized
clock stratum: 2
reference clock ID: LOCAL(0)
nominal frequency: 60.0002 Hz
actual frequency: 60.0002 Hz
clock precision: 2^18
clock offset: 0.0000 ms
root delay: 0.00 ms
root dispersion: 0.00 ms
peer dispersion: 10.00 ms
reference time: 15:51:36.259 UTC Apr 25 2020(C6179088.426490A3)
synchronization state: clock synchronized
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
parsed_sample:
- actual_frequency: "60.0002 Hz"
clock_delay: "0.00 ms"
clock_offset: "0.0000 ms"
clock_precision: "2^18"
clock_status: "synchronized"
clock_stratum: "2"
nominal_frequency: "60.0002 Hz"
peer_dispersion: "10.00 ms"
reference_clock_id: "LOCAL(0)"
reference_time: "15:51:36.259 UTC Apr 25 2020(C6179088.426490A3)"
root_dispersion: "0.00 ms"
synchronization_state: "clock synchronized"
Loading