From patchwork Tue Aug 8 20:53:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 9889107 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ECEF8603F2 for ; Tue, 8 Aug 2017 21:04:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF83528900 for ; Tue, 8 Aug 2017 21:04:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D46342895B; Tue, 8 Aug 2017 21:04:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6499928935 for ; Tue, 8 Aug 2017 21:04:14 +0000 (UTC) Received: from localhost ([::1]:44515 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dfBeu-0006O3-OD for patchwork-qemu-devel@patchwork.kernel.org; Tue, 08 Aug 2017 17:03:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dfBdy-0006MR-HC for qemu-devel@nongnu.org; Tue, 08 Aug 2017 17:02:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dfBdx-0007dr-6X for qemu-devel@nongnu.org; Tue, 08 Aug 2017 17:02:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9761) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dfBdw-0007dZ-U9 for qemu-devel@nongnu.org; Tue, 08 Aug 2017 17:02:25 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D39CF7F415 for ; Tue, 8 Aug 2017 20:53:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D39CF7F415 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=crosa@redhat.com Received: from localhost.localdomain.com (ovpn-122-200.rdu2.redhat.com [10.10.122.200]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4201B5DD65; Tue, 8 Aug 2017 20:53:55 +0000 (UTC) From: Cleber Rosa To: Eric Blake , Markus Armbruster Date: Tue, 8 Aug 2017 16:53:27 -0400 Message-Id: <20170808205327.8768-2-crosa@redhat.com> In-Reply-To: <20170808205327.8768-1-crosa@redhat.com> References: <20170808205327.8768-1-crosa@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 08 Aug 2017 20:53:55 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/1] QAPI schema: turn example commands/returns into proper JSON X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org, Cleber Rosa Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Most QMP commands and returns in the QAPI schema documentation are valid "JSON-based wire format". A few examples are either malformed, or contain comments. This fixes all the examples command and return data, making them proper JSON, as they would be received and generated by QEMU's QMP monitor. Signed-off-by: Cleber Rosa Reviewed-by: Eric Blake --- qapi-schema.json | 9 ++++----- qapi/block-core.json | 32 ++++++++++++++++---------------- qapi/rocker.json | 5 +---- 3 files changed, 21 insertions(+), 25 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index 802ea53d00..78c1e8cbde 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -2000,8 +2000,7 @@ # "host": "127.0.0.1", # "channel-id": 0, # "tls": false -# }, -# [ ... more channels follow ... ] +# } # ] # } # } @@ -2039,7 +2038,7 @@ # # -> { "execute": "query-balloon" } # <- { "return": { -# "actual": 1073741824, +# "actual": 1073741824 # } # } # @@ -3536,7 +3535,7 @@ # # -> { "execute": "query-dump-guest-memory-capability" } # <- { "return": { "formats": -# ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] } +# ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] } } # ## { 'command': 'query-dump-guest-memory-capability', @@ -6500,7 +6499,7 @@ # "vcpus-count": 1 }, # { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core", # "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"} -# ]}' +# ]} # # For pc machine type started with -smp 1,maxcpus=2: # diff --git a/qapi/block-core.json b/qapi/block-core.json index 833c602150..ab273a4729 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -801,10 +801,10 @@ # "wr_bytes":9786368, # "wr_operations":751, # "rd_bytes":122567168, -# "rd_operations":36772 -# "wr_total_times_ns":313253456 -# "rd_total_times_ns":3465673657 -# "flush_total_times_ns":49653 +# "rd_operations":36772, +# "wr_total_times_ns":313253456, +# "rd_total_times_ns":3465673657, +# "flush_total_times_ns":49653, # "flush_operations":61, # "rd_merged":0, # "wr_merged":0, @@ -818,10 +818,10 @@ # "wr_bytes":9786368, # "wr_operations":692, # "rd_bytes":122739200, -# "rd_operations":36604 +# "rd_operations":36604, # "flush_operations":51, -# "wr_total_times_ns":313253456 -# "rd_total_times_ns":3465673657 +# "wr_total_times_ns":313253456, +# "rd_total_times_ns":3465673657, # "flush_total_times_ns":49653, # "rd_merged":0, # "wr_merged":0, @@ -837,10 +837,10 @@ # "wr_bytes":0, # "wr_operations":0, # "rd_bytes":0, -# "rd_operations":0 +# "rd_operations":0, # "flush_operations":0, -# "wr_total_times_ns":0 -# "rd_total_times_ns":0 +# "wr_total_times_ns":0, +# "rd_total_times_ns":0, # "flush_total_times_ns":0, # "rd_merged":0, # "wr_merged":0, @@ -855,10 +855,10 @@ # "wr_bytes":0, # "wr_operations":0, # "rd_bytes":0, -# "rd_operations":0 +# "rd_operations":0, # "flush_operations":0, -# "wr_total_times_ns":0 -# "rd_total_times_ns":0 +# "wr_total_times_ns":0, +# "rd_total_times_ns":0, # "flush_total_times_ns":0, # "rd_merged":0, # "wr_merged":0, @@ -873,10 +873,10 @@ # "wr_bytes":0, # "wr_operations":0, # "rd_bytes":0, -# "rd_operations":0 +# "rd_operations":0, # "flush_operations":0, -# "wr_total_times_ns":0 -# "rd_total_times_ns":0 +# "wr_total_times_ns":0, +# "rd_total_times_ns":0, # "flush_total_times_ns":0, # "rd_merged":0, # "wr_merged":0, diff --git a/qapi/rocker.json b/qapi/rocker.json index 3587661161..345863b600 100644 --- a/qapi/rocker.json +++ b/qapi/rocker.json @@ -249,10 +249,7 @@ # "hits": 138, # "cookie": 0, # "action": {"goto-tbl": 10}, -# "mask": {"in-pport": 4294901760} -# }, -# {...more...}, -# ]} +# "mask": {"in-pport": 4294901760} } ] } # ## { 'command': 'query-rocker-of-dpa-flows',