diff options
author | Stefan Reiter <s.reiter@proxmox.com> | 2022-02-25 09:49:48 +0100 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2022-03-02 18:12:40 +0000 |
commit | 7277db9103bc82a79cdd5db633560d2638fbfc33 (patch) | |
tree | 8719ddaa443bebcf0502e53f41fe4cf02a2b9b62 /qapi/ui.json | |
parent | 26fcd766179e8a27c4c6c702201bdb0fe60eb091 (diff) | |
download | qemu-7277db9103bc82a79cdd5db633560d2638fbfc33.zip qemu-7277db9103bc82a79cdd5db633560d2638fbfc33.tar.gz qemu-7277db9103bc82a79cdd5db633560d2638fbfc33.tar.bz2 |
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/ui.json')
-rw-r--r-- | qapi/ui.json | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/qapi/ui.json b/qapi/ui.json index 9354f4c..e112409 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: |