summaryrefslogtreecommitdiffstats
path: root/qapi
diff options
context:
space:
mode:
authorStefan Reiter2022-02-25 09:49:48 +0100
committerDr. David Alan Gilbert2022-03-02 19:12:40 +0100
commit7277db9103bc82a79cdd5db633560d2638fbfc33 (patch)
tree8719ddaa443bebcf0502e53f41fe4cf02a2b9b62 /qapi
parentmonitor/hmp: add support for flag argument with value (diff)
downloadqemu-7277db9103bc82a79cdd5db633560d2638fbfc33.tar.gz
qemu-7277db9103bc82a79cdd5db633560d2638fbfc33.tar.xz
qemu-7277db9103bc82a79cdd5db633560d2638fbfc33.zip
qapi/monitor: refactor set/expire_password with enums
'protocol' and 'connected' are better suited as enums than as strings, make use of that. No functional change intended. Suggested-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Reiter <s.reiter@proxmox.com> [FE: update "Since: " from 6.2 to 7.0 put 'keep' first in enum to ease use as a default] Signed-off-by: Fabian Ebner <f.ebner@proxmox.com> Message-Id: <20220225084949.35746-3-f.ebner@proxmox.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/ui.json36
1 files changed, 34 insertions, 2 deletions
diff --git a/qapi/ui.json b/qapi/ui.json
index 9354f4c467..e112409211 100644
--- a/qapi/ui.json
+++ b/qapi/ui.json
@@ -10,6 +10,34 @@
{ 'include': 'sockets.json' }
##
+# @DisplayProtocol:
+#
+# Display protocols which support changing password options.
+#
+# Since: 7.0
+#
+##
+{ 'enum': 'DisplayProtocol',
+ 'data': [ 'vnc', 'spice' ] }
+
+##
+# @SetPasswordAction:
+#
+# An action to take on changing a password on a connection with active clients.
+#
+# @keep: maintain existing clients
+#
+# @fail: fail the command if clients are connected
+#
+# @disconnect: disconnect existing clients
+#
+# Since: 7.0
+#
+##
+{ 'enum': 'SetPasswordAction',
+ 'data': [ 'keep', 'fail', 'disconnect' ] }
+
+##
# @set_password:
#
# Sets the password of a remote display session.
@@ -38,7 +66,9 @@
#
##
{ 'command': 'set_password',
- 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
+ 'data': { 'protocol': 'DisplayProtocol',
+ 'password': 'str',
+ '*connected': 'SetPasswordAction' } }
##
# @expire_password:
@@ -71,7 +101,9 @@
# <- { "return": {} }
#
##
-{ 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
+{ 'command': 'expire_password',
+ 'data': { 'protocol': 'DisplayProtocol',
+ 'time': 'str' } }
##
# @screendump: