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


Reply via email to