Skip to content

Commit

Permalink
doc: Update developers-guide
Browse files Browse the repository at this point in the history
- communicate regarding YANG
- add StatD with focus on Yanger
- add test dev procedures

Resolves #934
  • Loading branch information
axkar committed Feb 17, 2025
1 parent 30096c3 commit 9d5c04e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
27 changes: 19 additions & 8 deletions doc/developers-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,22 +166,33 @@ Now you can rebuild `confd`, just as described above, and restart Infix:

### `statd`

The Infix `src/statd/` (Status Daemon) populates operational data in
the sysrepo datastore using again XPath subscriptions.

StatD relies entirely on `yanger`, a Python script that gathers data from
local linux services and feeds it into sysrepo.
The Infix status daemon, `src/statd`, is responsible for populating the
sysrepo `operational` datastore. Like `confd` it uses XPath subscriptions,
but unlike confd it relies entirely on `yanger`, a Python script that
gathers data from local linux services and feeds it into sysrepo.

To apply changes, rebuild the image:

make python-statd-rebuild statd-rebuild all

Rebuilding statd for every change during development process can be
tedious. Instead, `yanger` allows remote execution, running the script
directly on the host system (test container):
Rebuilding the image and testing on target for every change during
development process can be tedious. Instead, `yanger` allows remote
execution, running the script directly on the host system (test
container):

infamy0:test # ../src/statd/python/yanger/yanger -x "../utils/ixll -A ssh d3a" ieee802-dot1ab-lldp

`ixll` is a utility script that enables network commands to be executed
using an interface name instead of a hostname. It simplifies operations
like `ssh`, `scp`, and network discovery.

`yanger` normally runs commands on the local systems to retrieve data
(i.e. `lldpcli`). When executed with `-x "../utils/ixll -A ssh d3a"`,
it redirects those commands to run on a remote system
(connected to local `d3a` interaface) via SSH. This is aimed for remote
execution of `yanger` in
[interractive test environment](testing.md#interactive-usage)

For debugging or testing, you can capture system command output and
replay it later without needing a live system.

Expand Down
2 changes: 1 addition & 1 deletion doc/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ arguments:
To run a suite of tests, e.g., only the DHCP client tests, pass the
suite as an argument to [9PM][]:

11:42:53 infamy0:test # ./9pm/9pm.py case/infix_dhcp/all.yaml
11:42:53 infamy0:test # ./9pm/9pm.py case/infix_dhcp/infix_dhcp.yaml

To run the suite of all tests:

Expand Down

0 comments on commit 9d5c04e

Please sign in to comment.