* [Qemu-devel] [PATCH] qapi: make the json schema files more regular.
@ 2016-09-22 4:00 David Anderson
2016-09-22 13:07 ` Eric Blake
2016-09-29 15:52 ` Michael Tokarev
0 siblings, 2 replies; 7+ messages in thread
From: David Anderson @ 2016-09-22 4:00 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, David Anderson
This makes it easier to parse the schema file for tool generation:
each paragraph is either a non-docstring comment, or a docstring
immediately followed by a Python dict describing an API item.
Signed-off-by: David Anderson <dave@natulte.net>
---
qapi-schema.json | 3 +--
qapi/block-core.json | 5 -----
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/qapi-schema.json b/qapi-schema.json
index e507061..edd803f 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -752,6 +752,7 @@
'cpu-throttle-increment': 'int',
'tls-creds': 'str',
'tls-hostname': 'str'} }
+
##
# @query-migrate-parameters
#
@@ -4115,7 +4116,6 @@
#
# Since 1.6
##
-
{ 'struct': 'RxFilterInfo',
'data': {
'name': 'str',
@@ -4335,7 +4335,6 @@
#
# Since: 2.1
##
-
{ 'struct': 'Memdev',
'data': {
'size': 'size',
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 24223fd..e12fbd3 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -25,7 +25,6 @@
# Since: 1.3
#
##
-
{ 'struct': 'SnapshotInfo',
'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int',
'date-sec': 'int', 'date-nsec': 'int',
@@ -81,7 +80,6 @@
#
# Since: 1.7
##
-
{ 'union': 'ImageInfoSpecific',
'data': {
'qcow2': 'ImageInfoSpecificQCow2',
@@ -129,7 +127,6 @@
# Since: 1.3
#
##
-
{ 'struct': 'ImageInfo',
'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
'*actual-size': 'int', 'virtual-size': 'int',
@@ -181,7 +178,6 @@
# Since: 1.4
#
##
-
{ 'struct': 'ImageCheck',
'data': {'filename': 'str', 'format': 'str', 'check-errors': 'int',
'*image-end-offset': 'int', '*corruptions': 'int', '*leaks': 'int',
@@ -518,7 +514,6 @@
#
# Since: 2.5
##
-
{ 'struct': 'BlockDeviceTimedStats',
'data': { 'interval_length': 'int', 'min_rd_latency_ns': 'int',
'max_rd_latency_ns': 'int', 'avg_rd_latency_ns': 'int',
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] qapi: make the json schema files more regular.
2016-09-22 4:00 [Qemu-devel] [PATCH] qapi: make the json schema files more regular David Anderson
@ 2016-09-22 13:07 ` Eric Blake
2016-09-23 20:04 ` David Anderson
2016-09-29 15:52 ` Michael Tokarev
1 sibling, 1 reply; 7+ messages in thread
From: Eric Blake @ 2016-09-22 13:07 UTC (permalink / raw)
To: David Anderson, qemu-devel
Cc: qemu-trivial, Markus Armbruster, Marc-André Lureau
[-- Attachment #1: Type: text/plain, Size: 2512 bytes --]
On 09/21/2016 11:00 PM, David Anderson wrote:
> This makes it easier to parse the schema file for tool generation:
> each paragraph is either a non-docstring comment, or a docstring
> immediately followed by a Python dict describing an API item.
>
> Signed-off-by: David Anderson <dave@natulte.net>
> ---
> qapi-schema.json | 3 +--
> qapi/block-core.json | 5 -----
> 2 files changed, 1 insertion(+), 7 deletions(-)
Related to the work Marc-Andre is already doing, but fine to take now.
Reviewed-by: Eric Blake <eblake@redhat.com>
>
> diff --git a/qapi-schema.json b/qapi-schema.json
> index e507061..edd803f 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -752,6 +752,7 @@
> 'cpu-throttle-increment': 'int',
> 'tls-creds': 'str',
> 'tls-hostname': 'str'} }
> +
> ##
> # @query-migrate-parameters
> #
> @@ -4115,7 +4116,6 @@
> #
> # Since 1.6
> ##
> -
> { 'struct': 'RxFilterInfo',
> 'data': {
> 'name': 'str',
> @@ -4335,7 +4335,6 @@
> #
> # Since: 2.1
> ##
> -
> { 'struct': 'Memdev',
> 'data': {
> 'size': 'size',
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 24223fd..e12fbd3 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -25,7 +25,6 @@
> # Since: 1.3
> #
> ##
> -
> { 'struct': 'SnapshotInfo',
> 'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int',
> 'date-sec': 'int', 'date-nsec': 'int',
> @@ -81,7 +80,6 @@
> #
> # Since: 1.7
> ##
> -
> { 'union': 'ImageInfoSpecific',
> 'data': {
> 'qcow2': 'ImageInfoSpecificQCow2',
> @@ -129,7 +127,6 @@
> # Since: 1.3
> #
> ##
> -
> { 'struct': 'ImageInfo',
> 'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
> '*actual-size': 'int', 'virtual-size': 'int',
> @@ -181,7 +178,6 @@
> # Since: 1.4
> #
> ##
> -
> { 'struct': 'ImageCheck',
> 'data': {'filename': 'str', 'format': 'str', 'check-errors': 'int',
> '*image-end-offset': 'int', '*corruptions': 'int', '*leaks': 'int',
> @@ -518,7 +514,6 @@
> #
> # Since: 2.5
> ##
> -
> { 'struct': 'BlockDeviceTimedStats',
> 'data': { 'interval_length': 'int', 'min_rd_latency_ns': 'int',
> 'max_rd_latency_ns': 'int', 'avg_rd_latency_ns': 'int',
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] qapi: make the json schema files more regular.
2016-09-22 13:07 ` Eric Blake
@ 2016-09-23 20:04 ` David Anderson
2016-09-23 20:16 ` Marc-André Lureau
2016-09-23 20:17 ` Eric Blake
0 siblings, 2 replies; 7+ messages in thread
From: David Anderson @ 2016-09-23 20:04 UTC (permalink / raw)
To: Eric Blake
Cc: qemu-devel, qemu-trivial, Markus Armbruster, Marc-André Lureau
On Thu, Sep 22, 2016 at 6:07 AM, Eric Blake <eblake@redhat.com> wrote:
> On 09/21/2016 11:00 PM, David Anderson wrote:
> > This makes it easier to parse the schema file for tool generation:
> > each paragraph is either a non-docstring comment, or a docstring
> > immediately followed by a Python dict describing an API item.
> >
> > Signed-off-by: David Anderson <dave@natulte.net>
> > ---
> > qapi-schema.json | 3 +--
> > qapi/block-core.json | 5 -----
> > 2 files changed, 1 insertion(+), 7 deletions(-)
>
> Related to the work Marc-Andre is already doing, but fine to take now.
>
Do you have a link to that work? It sounds like the schema format may be
changing, which is relevant to my interests since I'm trying to parse it :).
- Dave
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
>
> >
> > diff --git a/qapi-schema.json b/qapi-schema.json
> > index e507061..edd803f 100644
> > --- a/qapi-schema.json
> > +++ b/qapi-schema.json
> > @@ -752,6 +752,7 @@
> > 'cpu-throttle-increment': 'int',
> > 'tls-creds': 'str',
> > 'tls-hostname': 'str'} }
> > +
> > ##
> > # @query-migrate-parameters
> > #
> > @@ -4115,7 +4116,6 @@
> > #
> > # Since 1.6
> > ##
> > -
> > { 'struct': 'RxFilterInfo',
> > 'data': {
> > 'name': 'str',
> > @@ -4335,7 +4335,6 @@
> > #
> > # Since: 2.1
> > ##
> > -
> > { 'struct': 'Memdev',
> > 'data': {
> > 'size': 'size',
> > diff --git a/qapi/block-core.json b/qapi/block-core.json
> > index 24223fd..e12fbd3 100644
> > --- a/qapi/block-core.json
> > +++ b/qapi/block-core.json
> > @@ -25,7 +25,6 @@
> > # Since: 1.3
> > #
> > ##
> > -
> > { 'struct': 'SnapshotInfo',
> > 'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int',
> > 'date-sec': 'int', 'date-nsec': 'int',
> > @@ -81,7 +80,6 @@
> > #
> > # Since: 1.7
> > ##
> > -
> > { 'union': 'ImageInfoSpecific',
> > 'data': {
> > 'qcow2': 'ImageInfoSpecificQCow2',
> > @@ -129,7 +127,6 @@
> > # Since: 1.3
> > #
> > ##
> > -
> > { 'struct': 'ImageInfo',
> > 'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
> > '*actual-size': 'int', 'virtual-size': 'int',
> > @@ -181,7 +178,6 @@
> > # Since: 1.4
> > #
> > ##
> > -
> > { 'struct': 'ImageCheck',
> > 'data': {'filename': 'str', 'format': 'str', 'check-errors': 'int',
> > '*image-end-offset': 'int', '*corruptions': 'int', '*leaks':
> 'int',
> > @@ -518,7 +514,6 @@
> > #
> > # Since: 2.5
> > ##
> > -
> > { 'struct': 'BlockDeviceTimedStats',
> > 'data': { 'interval_length': 'int', 'min_rd_latency_ns': 'int',
> > 'max_rd_latency_ns': 'int', 'avg_rd_latency_ns': 'int',
> >
>
> --
> Eric Blake eblake redhat com +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] qapi: make the json schema files more regular.
2016-09-23 20:04 ` David Anderson
@ 2016-09-23 20:16 ` Marc-André Lureau
2016-09-23 20:17 ` Eric Blake
1 sibling, 0 replies; 7+ messages in thread
From: Marc-André Lureau @ 2016-09-23 20:16 UTC (permalink / raw)
To: David Anderson
Cc: Eric Blake, qemu-devel, qemu-trivial, Markus Armbruster,
Marc-André Lureau
Hi
----- Original Message -----
> On Thu, Sep 22, 2016 at 6:07 AM, Eric Blake <eblake@redhat.com> wrote:
>
> > On 09/21/2016 11:00 PM, David Anderson wrote:
> > > This makes it easier to parse the schema file for tool generation:
> > > each paragraph is either a non-docstring comment, or a docstring
> > > immediately followed by a Python dict describing an API item.
> > >
> > > Signed-off-by: David Anderson <dave@natulte.net>
> > > ---
> > > qapi-schema.json | 3 +--
> > > qapi/block-core.json | 5 -----
> > > 2 files changed, 1 insertion(+), 7 deletions(-)
> >
> > Related to the work Marc-Andre is already doing, but fine to take now.
> >
>
> Do you have a link to that work? It sounds like the schema format may be
> changing, which is relevant to my interests since I'm trying to parse it :).
>
I wrote a schema doc parser/generator: see http://patchew.org/QEMU/20160922155808.8504-1-marcandre.lureau%40redhat.com/.
The format is not changing, just augmented a bit.
> - Dave
>
>
> >
> > Reviewed-by: Eric Blake <eblake@redhat.com>
> >
> > >
> > > diff --git a/qapi-schema.json b/qapi-schema.json
> > > index e507061..edd803f 100644
> > > --- a/qapi-schema.json
> > > +++ b/qapi-schema.json
> > > @@ -752,6 +752,7 @@
> > > 'cpu-throttle-increment': 'int',
> > > 'tls-creds': 'str',
> > > 'tls-hostname': 'str'} }
> > > +
> > > ##
> > > # @query-migrate-parameters
> > > #
> > > @@ -4115,7 +4116,6 @@
> > > #
> > > # Since 1.6
> > > ##
> > > -
> > > { 'struct': 'RxFilterInfo',
> > > 'data': {
> > > 'name': 'str',
> > > @@ -4335,7 +4335,6 @@
> > > #
> > > # Since: 2.1
> > > ##
> > > -
> > > { 'struct': 'Memdev',
> > > 'data': {
> > > 'size': 'size',
> > > diff --git a/qapi/block-core.json b/qapi/block-core.json
> > > index 24223fd..e12fbd3 100644
> > > --- a/qapi/block-core.json
> > > +++ b/qapi/block-core.json
> > > @@ -25,7 +25,6 @@
> > > # Since: 1.3
> > > #
> > > ##
> > > -
> > > { 'struct': 'SnapshotInfo',
> > > 'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int',
> > > 'date-sec': 'int', 'date-nsec': 'int',
> > > @@ -81,7 +80,6 @@
> > > #
> > > # Since: 1.7
> > > ##
> > > -
> > > { 'union': 'ImageInfoSpecific',
> > > 'data': {
> > > 'qcow2': 'ImageInfoSpecificQCow2',
> > > @@ -129,7 +127,6 @@
> > > # Since: 1.3
> > > #
> > > ##
> > > -
> > > { 'struct': 'ImageInfo',
> > > 'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
> > > '*actual-size': 'int', 'virtual-size': 'int',
> > > @@ -181,7 +178,6 @@
> > > # Since: 1.4
> > > #
> > > ##
> > > -
> > > { 'struct': 'ImageCheck',
> > > 'data': {'filename': 'str', 'format': 'str', 'check-errors': 'int',
> > > '*image-end-offset': 'int', '*corruptions': 'int', '*leaks':
> > 'int',
> > > @@ -518,7 +514,6 @@
> > > #
> > > # Since: 2.5
> > > ##
> > > -
> > > { 'struct': 'BlockDeviceTimedStats',
> > > 'data': { 'interval_length': 'int', 'min_rd_latency_ns': 'int',
> > > 'max_rd_latency_ns': 'int', 'avg_rd_latency_ns': 'int',
> > >
> >
> > --
> > Eric Blake eblake redhat com +1-919-301-3266
> > Libvirt virtualization library http://libvirt.org
> >
> >
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] qapi: make the json schema files more regular.
2016-09-23 20:04 ` David Anderson
2016-09-23 20:16 ` Marc-André Lureau
@ 2016-09-23 20:17 ` Eric Blake
1 sibling, 0 replies; 7+ messages in thread
From: Eric Blake @ 2016-09-23 20:17 UTC (permalink / raw)
To: David Anderson
Cc: qemu-devel, qemu-trivial, Markus Armbruster, Marc-André Lureau
[-- Attachment #1: Type: text/plain, Size: 1003 bytes --]
On 09/23/2016 03:04 PM, David Anderson wrote:
> On Thu, Sep 22, 2016 at 6:07 AM, Eric Blake <eblake@redhat.com> wrote:
>
>> On 09/21/2016 11:00 PM, David Anderson wrote:
>>> This makes it easier to parse the schema file for tool generation:
>>> each paragraph is either a non-docstring comment, or a docstring
>>> immediately followed by a Python dict describing an API item.
>>>
>>> Signed-off-by: David Anderson <dave@natulte.net>
>>> ---
>>> qapi-schema.json | 3 +--
>>> qapi/block-core.json | 5 -----
>>> 2 files changed, 1 insertion(+), 7 deletions(-)
>>
>> Related to the work Marc-Andre is already doing, but fine to take now.
>>
>
> Do you have a link to that work? It sounds like the schema format may be
> changing, which is relevant to my interests since I'm trying to parse it :).
https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg05782.html
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] qapi: make the json schema files more regular.
2016-09-22 4:00 [Qemu-devel] [PATCH] qapi: make the json schema files more regular David Anderson
2016-09-22 13:07 ` Eric Blake
@ 2016-09-29 15:52 ` Michael Tokarev
2016-10-09 22:39 ` David Anderson
1 sibling, 1 reply; 7+ messages in thread
From: Michael Tokarev @ 2016-09-29 15:52 UTC (permalink / raw)
To: David Anderson, qemu-devel; +Cc: qemu-trivial
22.09.2016 07:00, David Anderson wrote:
> This makes it easier to parse the schema file for tool generation:
> each paragraph is either a non-docstring comment, or a docstring
> immediately followed by a Python dict describing an API item.
Applied to -trivial, thanks!
/mjt
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] qapi: make the json schema files more regular.
2016-09-29 15:52 ` Michael Tokarev
@ 2016-10-09 22:39 ` David Anderson
0 siblings, 0 replies; 7+ messages in thread
From: David Anderson @ 2016-10-09 22:39 UTC (permalink / raw)
To: Michael Tokarev; +Cc: qemu-devel, qemu-trivial
This patch doesn't seem to be in the main repo yet. Any idea when it might
land?
- Dave
On Thu, Sep 29, 2016 at 8:52 AM, Michael Tokarev <mjt@tls.msk.ru> wrote:
> 22.09.2016 07:00, David Anderson wrote:
>
>> This makes it easier to parse the schema file for tool generation:
>> each paragraph is either a non-docstring comment, or a docstring
>> immediately followed by a Python dict describing an API item.
>>
>
> Applied to -trivial, thanks!
>
> /mjt
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-10-09 22:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-22 4:00 [Qemu-devel] [PATCH] qapi: make the json schema files more regular David Anderson
2016-09-22 13:07 ` Eric Blake
2016-09-23 20:04 ` David Anderson
2016-09-23 20:16 ` Marc-André Lureau
2016-09-23 20:17 ` Eric Blake
2016-09-29 15:52 ` Michael Tokarev
2016-10-09 22:39 ` David Anderson
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.