From: Eric Blake <eblake@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>,
"Vinzenz 'evilissimo' Feenstra" <vfeenstr@redhat.com>,
qemu-devel@nongnu.org
Cc: mdroth@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH v1] qga: Add 'guest-get-users' command
Date: Tue, 28 Mar 2017 08:12:48 -0500 [thread overview]
Message-ID: <b481c70f-3e0b-0b0f-a8f0-620b75e18a6d@redhat.com> (raw)
In-Reply-To: <CAJ+F1CK0n7m+mPBeUOOD0TXNroogjK3iMWthyQhdDVwd=3G8fA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1776 bytes --]
On 03/28/2017 04:34 AM, Marc-André Lureau wrote:
> Hi
>
> On Tue, Mar 28, 2017 at 9:22 AM Vinzenz 'evilissimo' Feenstra <
> vfeenstr@redhat.com> wrote:
>
>> From: Vinzenz Feenstra <vfeenstr@redhat.com>
>>
>> A command that will list all currenctly logged in users having running
s/currenctly/currently/
>> processes.
Do you also want to include how long the user has been logged in, if
available? (a 'num' for floating-point seconds may be the best unit for
that).
>> +++ b/qga/qapi-schema.json
>> @@ -1042,3 +1042,24 @@
>> 'data': { 'path': 'str', '*arg': ['str'], '*env': ['str'],
>> '*input-data': 'str', '*capture-output': 'bool' },
>> 'returns': 'GuestExec' }
>> +
>> +##
>> +# @GuestUser:
>> +# @user: Username
>> +# @domain: Logon domain (windows only)
>>
>
> Or use a flat union? (like suggested for get-osinfo)
Here, I don't see much benefit to a flat union. The field is present
only when the guest can supply it, and there is no obvious discriminator
to mention whether the field must be present. I think the structure is
just fine as proposed, unless you want to also add a duration parameter
for how long the user has been logged in.
>> +##
>> +# @guest-get-users:
>> +# Retrieves a list of currently active user accounts on the VM.
Accounts that exist even if no one is logged in at the moment, or
accounts that currently have someone logged in?
>> +#
>> +# Returns: A unique list of users.
>> +#
>> +# Since: 2.10
>> +##
>> +{ 'command': 'guest-get-users',
>> + 'returns': ['GuestUser'] }
>> --
>> 2.9.3
>>
>>
>> --
> Marc-André Lureau
>
--
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-03-28 13:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-28 7:21 [Qemu-devel] [PATCH v1] qga: Add 'guest-get-users' command Vinzenz 'evilissimo' Feenstra
2017-03-28 9:34 ` Marc-André Lureau
2017-03-28 13:12 ` 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=b481c70f-3e0b-0b0f-a8f0-620b75e18a6d@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).