From 3102a41f8faf62d20e73f9a30da2d137df8c31c6 Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Thu, 31 Aug 2023 15:16:38 +0000 Subject: [PATCH 1/2] markdownlint: ignore README.developer.md Signed-off-by: Douglas Schilling Landgraf --- .markdownlint-cli2.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.markdownlint-cli2.yaml b/.markdownlint-cli2.yaml index 5d97ac60b3..2fc80dd920 100644 --- a/.markdownlint-cli2.yaml +++ b/.markdownlint-cli2.yaml @@ -9,3 +9,4 @@ globs: ignores: - "doc/man/*.md" - "subprojects/*/*.md" + - "README.developer.md" From 281db84c51fb09add532af02a68b4b626f21552f Mon Sep 17 00:00:00 2001 From: Douglas Schilling Landgraf Date: Thu, 31 Aug 2023 15:25:32 +0000 Subject: [PATCH 2/2] README.developer: add busctl info for bluechi Signed-off-by: Douglas Schilling Landgraf --- README.developer.md | 54 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/README.developer.md b/README.developer.md index f670e89e3b..b421bef39a 100644 --- a/README.developer.md +++ b/README.developer.md @@ -9,6 +9,7 @@ - [Linting](#linting) - [Build](#build) - [Debug](#debug) + - [Busctl](#busctl) - [Unit Tests](#unit-tests) - [Integration Tests](#integration-tests) - [Running](#running) @@ -55,6 +56,59 @@ sudo dnf install \ Check the [installation guide](https://github.com/DavidAnson/markdownlint-cli2#install) and use the most appropriate way of installation for your setup. +### busctl + +**busctl** is a systemd tool to introspect and monitor the D-Bus bus. See below some examples using busctl with bluechi service. + +**Instrospect org.eclipse.bluechi**: +```bash +# busctl introspect \ + org.eclipse.bluechi \ + /org/eclipse/bluechi + +NAME TYPE SIGNATURE RESULT/VALUE FLAGS +org.eclipse.bluechi.Manager interface - - - +.CreateMonitor method - o - +.DisableMetrics method - - - +.EnableMetrics method - - - +.GetNode method s o - +.ListNodes method - a(sos) - +.ListUnits method - a(sssssssouso) - +.Ping method s s - +.SetLogLevel method s - - +.JobNew signal uo - - +.JobRemoved signal uosss - - +.NodeConnectionStateChanged signal ss - - +org.eclipse.bluechi.Shutdown interface - - - +.Shutdown method - - - +org.freedesktop.DBus.Introspectable interface - - - +.Introspect method - s - +org.freedesktop.DBus.Peer interface - - - +.GetMachineId method - s - +.Ping method - - - +org.freedesktop.DBus.Properties interface - - - +.Get method ss v - +.GetAll method s a{sv} - +.Set method ssv - - +.PropertiesChanged signal sa{sv}as - - +``` + +**Example calling ListNodes**: +```bash +export SERVICE="org.eclipse.bluechi" +export OBJECT="/org/eclipse/bluechi" +export INTERFACE="org.eclipse.bluechi.Manager" +export METHOD="ListNodes" + +# busctl call \ + "${SERVICE}" \ + "${OBJECT}" \ + "${INTERFACE}" \ + "${METHOD}" + +a(sos) 3 "control" "/org/eclipse/bluechi/node/control" "online" "node1" "/org/eclipse/bluechi/node/node1" "online" "qm-node1" "/org/eclipse/bluechi/node/qm_2dnode1" "online" +``` + ### Code Style [clang-format](https://clang.llvm.org/docs/ClangFormat.html) is used to enforce a uniform code style. The formatting