qapi: Make BlockdevOptions doc example closer to reality
commitbd59adce692cbb70e5639c0f5611b45a0d107167
authorEric Blake <eblake@redhat.com>
Thu, 17 Mar 2016 22:48:38 +0000 (17 16:48 -0600)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 18 Mar 2016 09:29:26 +0000 (18 10:29 +0100)
tree36a347ca335e9a5e5ed002c4fe66d80656c9f4be
parent32bafa8fdd098d52fbf1102d5a5e48d29398c0aa
qapi: Make BlockdevOptions doc example closer to reality

Although we don't want to repeat the entire BlockdevOptions
QMP command in the example, it helps if we aren't needlessly
diverging (the initial example was written before we had
committed the actual QMP interface).  Use names that match what
is found in qapi/block-core.json, such as '*read-only' rather
than 'readonly', or 'BlockdevRef' rather than 'BlockRef'.

For the simple union example, invent BlockdevOptionsSimple so
that later text is unambiguous which of the two union forms is
meant (telling the user to refer back to two 'BlockdevOptions'
wasn't nice, and QMP has only the flat union form).

Also, mention that the discriminator of a flat union is
non-optional.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1458254921-17042-14-git-send-email-eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
docs/qapi-code-gen.txt