From 161a56a9065feb6fa2f69cec6237a5c4e714b9d3 Mon Sep 17 00:00:00 2001 From: Vinzenz Feenstra Date: Wed, 19 Apr 2017 11:26:15 +0200 Subject: qga: Add 'guest-get-users' command 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 * make g_hash_table_contains compat func inline to avoid unused warnings Signed-off-by: Michael Roth --- qga/qapi-schema.json | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'qga/qapi-schema.json') diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json index 0f4cba5dc3..f25467addf 100644 --- a/qga/qapi-schema.json +++ b/qga/qapi-schema.json @@ -1076,3 +1076,28 @@ ## { 'command': 'guest-get-host-name', 'returns': 'GuestHostName' } + + +## +# @GuestUser: +# @user: Username +# @domain: Logon domain (windows only) +# @login-time: Time of login of this user on the computer. If multiple +# instances of the user are logged in, the earliest login time is +# reported. The value is in fractional seconds since epoch time. +# +# 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'] } -- cgit v1.2.3-55-g7522