|
From: | Paolo Bonzini |
Subject: | Re: [PATCH v2 3/4] qmp: Allow setting -action parameters on the fly |
Date: | Thu, 10 Dec 2020 19:00:04 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 |
On 10/12/20 04:21, Alejandro Jimenez wrote:
I misunderstood your request in v1.
Oh ypu're right, in v1 you had multiple commands. My fault then.
{ 'command': 'set-action', 'data' : { '*reboot': 'RebootAction', '*shutdown': 'ShutdownAction', '*panic': 'PanicAction', '*watchdog': 'WatchdogAction' } } ?Or is it better to encapsulate all of those optional fields inside a new struct definition (RunStateActions?) so that the command would be:{ 'command': 'set-action', 'data': 'actions' : 'RunStateActions' }
Any of the two is fine; the QMP stream is the same. I used actions->reboot because that's what you did in v2.
While at it, you might add 'allow-preconfig': true,as well. (Right now there are relatively few allow-preconfig commands, but I'm in the process of adding it to all commands where it makes sense).
Thanks, Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |