Re: [PATCH 1/5] lib: add API to query info about logged-in users

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

 



On Thu, 2019-07-11 at 13:42 +0200, Peter Krempa wrote:
> On Thu, Jul 11, 2019 at 12:09:23 +0100, Daniel Berrange wrote:
> > On Wed, Jul 10, 2019 at 03:07:43PM -0500, Jonathon Jongsma wrote:
> > > Add API for querying logged-in users from a domain implemented
> > > via
> > > guest agent.
> > > 
> > > Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
> > > ---
> > >  include/libvirt/libvirt-domain.h | 18 ++++++++++
> > >  src/driver-hypervisor.h          |  6 ++++
> > >  src/libvirt-domain.c             | 62
> > > ++++++++++++++++++++++++++++++++
> > >  src/libvirt_public.syms          |  5 +++
> > >  4 files changed, 91 insertions(+)
> 
> [...]
> 
> > > +int virDomainGetGuestUsers(virDomainPtr domain,
> > > +                           virDomainUserInfoPtr **info,
> > > +                           unsigned int flags);
> > 
> > I can easily imagine QEMU returning more info per user in future,
> > so
> > using a struct is not futureproof design.
> > 
> > We should use the virTypedParameter approach instead here.
> 
> In addition to that, once we go with typed parameters, we can make
> the
> API more universal similarly to virDomainListGetStats. Working on one
> VM only in this case, but returning all the possible queryable stuff
> from the guest agent, so that we don't have to add APIs for every
> single
> thing an user would want to query.


Good points, thanks for the feedback. 

I'll have to think a bit more about a single API for aggregated stats.
I think that could get a bit ugly, but we'll see. Are you suggesting
folding the existing agent queries (e.g. fsinfo, vcpuinfo, etc) into
this same aggregated API? 

Jonathon

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux