qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v1] qga: Add 'guest-get-users' command


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v1] qga: Add 'guest-get-users' command
Date: Tue, 28 Mar 2017 08:12:48 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 03/28/2017 04:34 AM, Marc-André Lureau wrote:
> Hi
> 
> On Tue, Mar 28, 2017 at 9:22 AM Vinzenz 'evilissimo' Feenstra <
> address@hidden> wrote:
> 
>> From: Vinzenz Feenstra <address@hidden>
>>
>> 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: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]