qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] QAPI magician wanted ...


From: Igor Mammedov
Subject: [Qemu-devel] QAPI magician wanted ...
Date: Thu, 12 Oct 2017 14:21:53 +0200

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]