Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving D-Bus API description #917

Open
engelmi opened this issue Jul 23, 2024 · 0 comments
Open

Improving D-Bus API description #917

engelmi opened this issue Jul 23, 2024 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@engelmi
Copy link
Member

engelmi commented Jul 23, 2024

In the D-Bus API Description of BlueChi we describe the methods and properties of each interface. For the method signature we use the default D-Bus style, for example:

ListUnits(out a(sssssssouso) units)

In this example, we know the method ListUnits will output a list of units and respective information about them. And although we know the type of the list fields, we don't know what they are.

This could be improved by adding information about the individual field names (and maybe a short description) in the description block in
https://github.com/eclipse-bluechi/bluechi/blob/main/doc/docs/api/description.md

For example:

#### Methods

* `ListUnits(out a(sssssssouso) units)`

  Returns an array with all currently loaded systemd units on all online nodes. This is equivalent to calling
  `Node.ListUnits()` on all the online nodes and adding the name of the node as the first element of each returned
  element struct.

  `out` consists of the following variables:
      - The node name
      - The primary unit name as string
      - The human readable description string
      - The load state (i.e. whether the unit file has been loaded successfully)
      - The active state (i.e. whether the unit is currently started or not)
      - The sub state (a more fine-grained version of the active state that is specific to the unit type, which the active state is not)
      - A unit that is being followed in its state by this unit, if there is any, otherwise the empty string.
      - The unit object path
      - If there is a job queued for the job unit the numeric job id, 0 otherwise
      - The job type as string
      - The job object path

The information about this is already in the D-Bus API specification of BlueChi, e.g. here for the ListUnits on the controller.

@engelmi engelmi added documentation Improvements or additions to documentation good first issue Good for newcomers labels Jul 23, 2024
@odra odra self-assigned this Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants