ptp-notification-armada-app/.zuul.yaml
Cole Walker 04bbd6f0ff Add CguHandler, DmesgWatcher, GnssMonitor classes
The CguHandler class reads a given ts2phc config file and uses this to
derive the nmea_serialport, pci address and cgu path. These values can
be short-circuited if they are known in advance.
From there, the cgu is read and parsed into a dict in order to
easily derive the status of the various pins on the NIC.

DmesgWatcher and GnssMonitor use an observer pattern. DmesgWatcher is
the subject and follows entries in a dmesg log for patterns that
GnssMonitor observers care about. It then updates the GnssMonitor
observers with the matched entry allowing GnssMonitor to parse and
handle the update as required. The DmesgWatcher can be extended to
support other observer types in the future.

GnssMonitor attaches to DmesgWatcher and performs the handling for
changes in GNSS status. This includes sending the status change to a
publisher which will be implemented in a future review.

Unit tests are included for CguHandler and DmesgWatcher. GnssMonitor is
covered by the tests as it is built off the functionality of
CguHandler.

Tox has been updated to automatically run the unit tests.

Testing:

Pass: Unit tests pass

Story: 2010056
Task: 45500

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: I4be477aa0fce8baa418a3ff450c6b998683ec10b
2022-06-23 17:08:37 -04:00

137 lines
7.5 KiB
YAML

---
- project:
templates:
- publish-stx-docs
- stx-api-ref-jobs
# - stx-release-notes-jobs
check:
jobs:
- openstack-tox-linters
- k8sapp-ptp-notification-tox-pylint
- ptp-notification-tox-py36
gate:
jobs:
- openstack-tox-linters
- k8sapp-ptp-notification-tox-pylint
- ptp-notification-tox-py36
post:
jobs:
- stx-ptp-notification-armada-app-upload-git-mirror
- job:
name: stx-ptp-notification-armada-app-upload-git-mirror
parent: upload-git-mirror
description: >
Mirrors opendev.org/starlingx/ptp-notification-armada-app to
github.com/starlingx/ptp-notification-armada-app
vars:
git_mirror_repository: starlingx/ptp-notification-armada-app
secrets:
- name: git_mirror_credentials
secret: stx-ptp-notification-armada-app-github-secret
pass-to-parent: true
- job:
name: ptp-notification-tox-py36
parent: tox-py36
description: |
Run py36 test for ptp-notification
nodeset: ubuntu-bionic
vars:
tox_envlist: py36
- job:
name: k8sapp-ptp-notification-tox-pylint
parent: tox
description: |
Run pylint test for k8sapp-ptp-notification-tox-pylint
required-projects:
- starlingx/config
- starlingx/fault
- starlingx/update
- starlingx/utilities
files:
- python-k8sapp-ptp-notification/*
vars:
tox_envlist: pylint
tox_extra_args: -c python-k8sapp-ptp-notification/k8sapp_ptp_notification/tox.ini
- secret:
name: stx-ptp-notification-armada-app-github-secret
data:
user: git
host: github.com
# yamllint disable-line rule:line-length
host_key: github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
ssh_key: !encrypted/pkcs1-oaep
- YmB+K23jxbkIH7O3v7VCd0m3rUwK8WXQNLW4ZV6cUL4QqcTlobN+W2yW0ACZZj/SegW11
p7LyL5n65mFaLqq7M1/dImlqEYQ+Lgdl5BiQDITTzhEDGhgg3PtvUjpU6OP1V61lBPfLP
CN53lv/Kg/Ew2LkbiNXIsumw1hduOAryD3Z5ypV5uwKaKkEaScR++C7V8IRXQ7IaLJglN
IUKF3XQe0ehTht/Mip7/PpS3DwUyTXFmEGU0YmgAI1lYwrTDlRKEBhQSPB/jdJRRUbBLO
r+QIo9nvg7JLRBAU+vd1NQdFffbjoIDm/NCG6Tz2bwdDmPmOoC0dHeerQ5BqXQbqsDfxy
IK4DvuIZgqzzlZCrCvx0aeogKSNwWk2TbtrzUguToj0L7ofn8D67lsBJ6zD1gidhd4XFB
L/qP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