All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] QAPI magician wanted ...
@ 2017-10-12 12:21 Igor Mammedov
  2017-10-12 12:28 ` Daniel P. Berrange
  0 siblings, 1 reply; 5+ messages in thread
From: Igor Mammedov @ 2017-10-12 12:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Markus Armbruster, Eric Blake


I'm working on introducing QMP command to set numa mappings
via QMP interface at runtime instead of CLI.

I'd prefer to reuse NumaOptions for parsing input,
but I can't wrap my head around QAPI magic.

So far I've added new command in qapi-schema.json:

  {
    'command': 'set-numa-node',                                                    
    'data': {'cmd': 'NumaOptions'}                                                 
  }

it at least compiles and manages to handle input without union part

  { "execute": "set-numa-node", "arguments": { "cmd": { "type": "node" } } }

however I can't figure out syntax that adds union part to it,
I have tried something like this

  { "execute": "set-numa-node", "arguments": { "cmd": { "type": "node", "node" : { "nodeid": 1 } } } }

but it errors out with

  {"error": {"class": "GenericError", "desc": "Parameter 'cmd.node' is unexpected"}}

Any advice on how to make it work if possible at all or
alternative ways how to achieve the end goal.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-10-12 16:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-12 12:21 [Qemu-devel] QAPI magician wanted Igor Mammedov
2017-10-12 12:28 ` Daniel P. Berrange
2017-10-12 12:38   ` Igor Mammedov
2017-10-12 13:17     ` Eric Blake
2017-10-12 16:29       ` Igor Mammedov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.