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