HardwareState: Cooperation and compatibility with cla-sysrepo

IETF Hardware model exports only some components to Sysrepo. Some of
them are handled by cla-sysrepo daemon. In order for things to cooperate
smoothly, the following must be taken in mind:

1. Sysrepo does not allow two subscriptions to the same XPath. Velia
   therefore subscribes to "/ietf-hardware-state:hardware/*", which is
   a different path (but effectively the same). This is a workaround for
   Sysrepo described in [1].

2. ietf-hardware-state stores all the components in a tree (which is
   represented by a list with links to parents). Sysrepo does not (as of
   now) check whether the parent is present in the tree but this can of
   course change.
   cla-sysrepo, which starts first, handles some of the components whose
   parent is the topmost element. Therefore it must also handle the
   topmost element. It indeed initialises it (it creates the component
   and sets 'name', 'model' and 'class' leafs in the component -- see
   ietf-hardware-state YANG model [2]).
   However, velia will handle setting of some other properties (like
   reading and setting of serial numbers, manufacturer,...).

[1] https://github.com/sysrepo/sysrepo/issues/2191
[2] https://tools.ietf.org/html/rfc8348#appendix-A

Change-Id: Ia790a07a830334f8fd541bae9d770faf930a40fe
2 files changed
tree: 0fdbf0f41a5f26fbed76e1b82ccc5cb658d0d8f2
  1. .clang-format
  2. .gitmodules
  3. .zuul.CzechLight-internal.yaml
  4. .zuul.public.yaml
  5. CMakeLists.txt
  6. Doxyfile.in
  7. LICENSE
  8. LICENSE.md
  9. README.md
  10. ci/
  11. cmake/
  12. docs/
  13. src/
  14. tests/
  15. yang/
README.md

Health tracking for embedded devices running Linux

This software tracks health of an embedded device which runs Linux with systemd.

Velia tracks health of systemd units. In case some of them are failing, the system is considered unhealthy. You can disable monitoring of some units by using --systemd-ignore-unit CLI flags. For example, to disable monitoring unit sshd.service you should start velia with --systemd-ignore-unit=sshd.service. In order to disable multiple units use the flag multiple times.

By default, the health of state is shown by flashing certain LEDs. This is however customizable by using your own callbacks.