system: get LLDP neighbors from JSON output of networkctl
Old way of getting the LLDP neighbours list was through patched systemd.
We patched the systemd in a way that the functions working with LLDP
files in /run/systemd/netif/lldp were made public and thus we could use
them to parse the data [1]. That required to use patched systemd (for
br2-external and for CI test runs). This was not easily maintainable
with new systemd versions.
New attempt is parsing the output of `networkctl lldp --json=pretty`
which is available with the new patch [2].
This also asks for a redesign of tests as we currently have no way of
'injecting' LLDP neighbours into systemd-networkd unless we implement
our own varlink server providing the LLDP data (see the patch).
As we are parsing only the output of `networkctl lldp`, and we do not
rely on any systemd function (even for tests), there is no need to
compile patched systemd. That will also speedup the CI runs, yay.
[1] https://github.com/systemd/systemd/pull/16744
[2] https://github.com/systemd/systemd/pull/20333
Change-Id: Ib880fef50e8d44ca257b582e7d15027ffc5194c9
diff --git a/ci/pre.yaml b/ci/pre.yaml
index 5ed4273..1f55905 100644
--- a/ci/pre.yaml
+++ b/ci/pre.yaml
@@ -1,12 +1,13 @@
- hosts: all
tasks:
- - name: install systemd's build deps
- shell:
- cmd: dnf -y builddep systemd
- become: true
-
- name: install libnl
package:
name: libnl3-devel
state: present
become: true
+
+ - name: install nlohmann/json
+ package:
+ name: json-devel
+ state: present
+ become: true