[libvirt] [dbus PATCH 5/8] Implement GetAllDomainStats method for Connect Interface

Pavel Hrdina phrdina at redhat.com
Thu Apr 19 15:01:42 UTC 2018


On Thu, Apr 19, 2018 at 03:58:04PM +0200, Katerina Koukiou wrote:
> Signed-off-by: Katerina Koukiou <kkoukiou at redhat.com>
> ---
>  data/org.libvirt.Connect.xml |  7 +++++++
>  src/connect.c                | 40 ++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 47 insertions(+)
> 
> diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml
> index e5504f7..3ef965d 100644
> --- a/data/org.libvirt.Connect.xml
> +++ b/data/org.libvirt.Connect.xml
> @@ -94,6 +94,13 @@
>        <arg name="flags" type="u" direction="in"/>
>        <arg name="storagePoolSources" type="s" direction="out"/>
>      </method>
> +    <method name="GetAllDomainStats">
> +      <annotation name="org.gtk.GDBus.DocString"
> +        value="See https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetAllDomainStats"/>
> +      <arg name="stats" type="u" direction="in"/>
> +      <arg name="flags" type="u" direction="in"/>
> +      <arg name="records" type="av" direction="out"/>

The return type should be "a(sa{sv})" because it returns stats for
multiple domains.  For example:

[
    ( "centos6", { "state.state": 1, "state.reason": 1 } ),
    ( "centos7", { "state.state": 5, "state.reason": 1 } )
]

and the code needs to be updated accordingly.

Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180419/5fca716e/attachment-0001.sig>


More information about the libvir-list mailing list