Cole Walker f626e3a6b8 [PTP SyncE] Support ptp-notification on GM node
This change adds support for the ptp-notification armada app to track
the clock status on a node operating as GM. This is required for nodes
running Westport Channel NICs using the GNSS module as the clock and
time of day source. This will require a rebuild of the
notificationservice container image.

The also fixes an issue where ptp-notification would no longer deploy
with multi-instance ptp because several of the paths that were being
mounted to the pods have been changed. The fix was to change these paths
to user-configurable variables which can be supplied to the notification
application as helm overrides. This change is only to the helm charts
and does not require an image build.

Testing:

PASS: Build and deploy stx-ptp-notification-helm with multi instance
ptp.

PASS: Build notificationservice container and deploy with helm charts,
validated that a GM node reported locked/holdover/freerun status
correctly.

Closes-Bug: 1961358
Story: 2009130
Task: 44700

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: Ibc1fc6c6342f873ea75c2e4015eb4c910b7010fd
2022-03-07 11:03:41 -05:00

29 lines
712 B
Python

#
# Copyright (c) 2021 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# phc states constants
FREERUN_PHC_STATE = "Freerun"
LOCKED_PHC_STATE = "Locked"
HOLDOVER_PHC_STATE = "Holdover"
UNKNOWN_PHC_STATE = "Unknown"
# PMC command constants
PORT_STATE = "portState"
PORT = "port{}"
GM_PRESENT = "gmPresent"
MASTER_OFFSET = "master_offset"
GM_CLOCK_CLASS = "gm.ClockClass"
TIME_TRACEABLE = "timeTraceable"
CLOCK_IDENTITY = "clockIdentity"
GRANDMASTER_IDENTITY = "grandmasterIdentity"
# expected values for valid ptp state
SLAVE_MODE = "slave"
TIME_IS_TRACEABLE1 = "1"
TIME_IS_TRACEABLE2 = "true"
GM_IS_PRESENT = "true"
CLOCK_CLASS_VALUE1 = "6"
CLOCK_CLASS_VALUE2 = "7"
CLOCK_CLASS_VALUE3 = "135"