From 7a4582130b619915c0d4bcc5c67b30bef2043ed6 Mon Sep 17 00:00:00 2001 From: Omer Faruk Bayram Date: Sun, 13 Aug 2023 20:43:02 +0000 Subject: [PATCH] docs: api: document newly added event signal to the D-Bus API Signed-off-by: Omer Faruk Bayram --- docs/api.md | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/docs/api.md b/docs/api.md index befe297cf..88ec52675 100644 --- a/docs/api.md +++ b/docs/api.md @@ -206,11 +206,14 @@ curl --unix-socket /tmp/cloud-hypervisor.sock -i -X PUT 'http://localhost/api/v1 ### D-Bus API -Cloud Hypervisor offers a D-Bus API as an alternative to its REST API. As of -writing this document, the D-Bus API mirrors the functionality of the REST -API and shares the same set of endpoints, meaning that it supports every call -that is supported by the REST API and can be a drop-in replacement since it -also consumes/produces JSON. +Cloud Hypervisor offers a D-Bus API as an alternative to its REST API. This +D-Bus API fully reflects the functionality of the REST API, exposing the +same group of endpoints. It can be a drop-in replacement since it also +consumes/produces JSON. + +In addition, the D-Bus API also exposes events from `event-monitor` in the +form of a D-Bus signal to which users can subscribe. For more information, +see [D-Bus API Interface](#d-bus-api-interface). #### D-Bus API Location and availability @@ -245,8 +248,23 @@ which in turn can be used to control and manage Cloud Hypervisor. #### D-Bus API Interface -Please refer to the [REST API](#rest-api) documentation. As previously -mentioned, the D-Bus API currently mirrors the behaviour of the REST API. +Please refer to the [REST API](#rest-api) documentation for everything that +is in common with the REST API. As previously mentioned, the D-Bus API can +be used as a drop-in replacement for the [REST API](#rest-api). + +The D-Bus interface also exposes a signal, named `Event`, which is emitted +whenever a new event is published from the `event-monitor` crate. Here is its +definition in XML format: + +```xml + + + + + + + +``` ### Command Line Interface