From: Eric Blake <eblake@redhat.com>
To: Vinzenz 'evilissimo' Feenstra <vfeenstr@redhat.com>,
qemu-devel@nongnu.org
Cc: marcandre.lureau@gmail.com, mdroth@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH v2 1/1] qga: Add 'guest-get-users' command
Date: Mon, 3 Apr 2017 15:13:04 -0500 [thread overview]
Message-ID: <6711448f-1b5f-337e-471a-59fe56284bd1@redhat.com> (raw)
In-Reply-To: <20170403200823.7394-2-vfeenstr@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1844 bytes --]
On 04/03/2017 03:08 PM, Vinzenz 'evilissimo' Feenstra wrote:
> From: Vinzenz Feenstra <vfeenstr@redhat.com>
>
> A command that will list all currently logged in users, and the time
> since when they are logged in.
>
> Examples:
>
> virsh # qemu-agent-command F25 '{ "execute": "guest-get-users" }'
> {"return":[{"login-time":1490622289.903835,"user":"root"}]}
>
> virsh # qemu-agent-command Win2k12r2 '{ "execute": "guest-get-users" }'
> {"return":[{"login-time":1490351044.670552,"domain":"LADIDA",
> "user":"Administrator"}]}
>
> Signed-off-by: Vinzenz Feenstra <vfeenstr@redhat.com>
> ---
I'll leave the code reviews for others (I'm not comfortable enough with
Windows API programming), but focus on the interface here:
> +++ b/qga/qapi-schema.json
> @@ -1042,3 +1042,25 @@
> 'data': { 'path': 'str', '*arg': ['str'], '*env': ['str'],
> '*input-data': 'str', '*capture-output': 'bool' },
> 'returns': 'GuestExec' }
> +
> +##
> +# @GuestUser:
> +# @user: Username
> +# @domain: Logon domain (windows only)
> +# @login-time: Unix timestamp of login
In what unit? (Fractional) seconds since 1 Jan 1970?
So this is when they connected, and not a duration of how long they have
been logged on since then.
> +#
> +# Since: 2.10
> +##
> +{ 'struct': 'GuestUser',
> + 'data': { 'user': 'str', 'login-time': 'number', '*domain': 'str' } }
> +
> +##
> +# @guest-get-users:
> +# Retrieves a list of currently active users on the VM.
> +#
> +# Returns: A unique list of users.
> +#
> +# Since: 2.10
> +##
> +{ 'command': 'guest-get-users',
> + 'returns': ['GuestUser'] }
>
The API looks good once you add that additional documentation.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
prev parent reply other threads:[~2017-04-03 20:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-03 20:08 [Qemu-devel] [PATCH v2 0/1] qga: Add 'guest-get-users' command Vinzenz 'evilissimo' Feenstra
2017-04-03 20:08 ` [Qemu-devel] [PATCH v2 1/1] " Vinzenz 'evilissimo' Feenstra
2017-04-03 20:13 ` Eric Blake [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6711448f-1b5f-337e-471a-59fe56284bd1@redhat.com \
--to=eblake@redhat.com \
--cc=marcandre.lureau@gmail.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=vfeenstr@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).