All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: armbru@redhat.com, Michael Roth <mdroth@linux.vnet.ibm.com>,
	Stefan Berger <stefanb@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 2/3] qapi: Rename QMP and QGA schema files
Date: Sat, 10 Feb 2018 18:40:12 -0600	[thread overview]
Message-ID: <20180211004013.10784-3-eblake@redhat.com> (raw)
In-Reply-To: <20180211004013.10784-1-eblake@redhat.com>

Having two files in the tree both named qapi-schema.json just adds
confusion.  Rename these files, and relocate them into the common
qapi/ subdirectory.  Update all build rules that refer to the file
names, and adjust other documentation and comment references to
either track the new name or be rewritten so as to not mention
the file name.

Maintainer-wise, this means that qapi/qga-schema.json continues
to belong to Michael as QGA maintainer, but now also notifies
Markus and Eric as QAPI maintainers, alongside all the other
QMP QAPI files, matching how other .json QAPI modules belong
to multiple maintainer blurbs.

Signed-off-by: Eric Blake <eblake@redhat.com>
---
 docs/devel/writing-qmp-commands.txt          | 13 ++++++-----
 docs/interop/qmp-intro.txt                   |  3 ++-
 Makefile                                     | 10 ++++----
 qga/qapi-schema.json => qapi/qga-schema.json |  0
 qapi-schema.json => qapi/qmp-schema.json     | 34 ++++++++++++++--------------
 tpm.c                                        |  2 +-
 MAINTAINERS                                  |  2 +-
 7 files changed, 33 insertions(+), 31 deletions(-)
 rename qga/qapi-schema.json => qapi/qga-schema.json (100%)
 rename qapi-schema.json => qapi/qmp-schema.json (99%)

diff --git a/docs/devel/writing-qmp-commands.txt b/docs/devel/writing-qmp-commands.txt
index 4f5b24c0c4c..53a668817f5 100644
--- a/docs/devel/writing-qmp-commands.txt
+++ b/docs/devel/writing-qmp-commands.txt
@@ -13,10 +13,11 @@ start with docs/interop/qmp-intro.txt.
 == Overview ==

 Generally speaking, the following steps should be taken in order to write a
-new QMP command.
+new QMP command (similar steps for QGA).

-1. Write the command's and type(s) specification in the QAPI schema file
-   (qapi-schema.json in the root source directory)
+1. Write the command's and type(s) specification in the appropriate
+   QAPI schema file (qapi/qmp-schema.json, or one of the module .json
+   files it includes)

 2. Write the QMP command itself, which is a regular C function. Preferably,
    the command should be exported by some QEMU subsystem. But it can also be
@@ -89,7 +90,7 @@ Our command will be called "hello-world". It takes no arguments, nor does it
 return any data.

 The first step is to add the following line to the bottom of the
-qapi-schema.json file:
+qapi/qmp-schema.json file:

 { 'command': 'hello-world' }

@@ -234,7 +235,7 @@ this rule:
 If the failure you want to report falls into one of the two cases above,
 use error_set() with a second argument of an ErrorClass value.

- * All existing ErrorClass values are defined in the qapi-schema.json file
+ * All existing ErrorClass values are defined in the qapi/qmp-schema.json file

 === Command Documentation ===

@@ -245,7 +246,7 @@ This is very important. No QMP command will be accepted in QEMU without proper
 documentation.

 There are many examples of such documentation in the schema file already, but
-here goes "hello-world"'s new entry for the qapi-schema.json file:
+here goes "hello-world"'s new entry for the qapi/qmp-schema.json file:

 ##
 # @hello-world
diff --git a/docs/interop/qmp-intro.txt b/docs/interop/qmp-intro.txt
index adbc94abb1d..06d9c85a2cd 100644
--- a/docs/interop/qmp-intro.txt
+++ b/docs/interop/qmp-intro.txt
@@ -78,7 +78,8 @@ Escape character is '^]'.
     }
 }

-Please, refer to the qapi-schema.json file for a complete command reference.
+Please, refer to the qapi/qmp-schema.json file for a complete command
+reference.

 QMP wiki page
 -------------
diff --git a/Makefile b/Makefile
index 4ec7a3cb825..33d554a0801 100644
--- a/Makefile
+++ b/Makefile
@@ -488,22 +488,22 @@ gen-out-type = $(subst .,-,$(suffix $@))
 qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py

 qga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.h :\
-$(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
+$(SRC_PATH)/qapi/qga-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
 	$(call quiet-command,$(PYTHON_UTF8) $(SRC_PATH)/scripts/qapi-types.py \
 		$(gen-out-type) -o qga/qapi-generated -p "qga-" $<, \
 		"GEN","$@")
 qga/qapi-generated/qga-qapi-visit.c qga/qapi-generated/qga-qapi-visit.h :\
-$(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py)
+$(SRC_PATH)/qapi/qga-schema.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py)
 	$(call quiet-command,$(PYTHON_UTF8) $(SRC_PATH)/scripts/qapi-visit.py \
 		$(gen-out-type) -o qga/qapi-generated -p "qga-" $<, \
 		"GEN","$@")
 qga/qapi-generated/qga-qmp-commands.h qga/qapi-generated/qga-qmp-marshal.c :\
-$(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py)
+$(SRC_PATH)/qapi/qga-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py)
 	$(call quiet-command,$(PYTHON_UTF8) $(SRC_PATH)/scripts/qapi-commands.py \
 		$(gen-out-type) -o qga/qapi-generated -p "qga-" $<, \
 		"GEN","$@")

-qapi-modules = $(SRC_PATH)/qapi-schema.json $(SRC_PATH)/qapi/common.json \
+qapi-modules = $(SRC_PATH)/qapi/qmp-schema.json $(SRC_PATH)/qapi/common.json \
                $(SRC_PATH)/qapi/block.json $(SRC_PATH)/qapi/block-core.json \
                $(SRC_PATH)/qapi/char.json \
                $(SRC_PATH)/qapi/crypto.json \
@@ -815,7 +815,7 @@ docs/interop/qemu-qmp-qapi.texi docs/interop/qemu-ga-qapi.texi: $(SRC_PATH)/scri
 docs/interop/qemu-qmp-qapi.texi: $(qapi-modules)
 	$(call quiet-command,$(PYTHON_UTF8) $(SRC_PATH)/scripts/qapi2texi.py $< > $@,"GEN","$@")

-docs/interop/qemu-ga-qapi.texi: $(SRC_PATH)/qga/qapi-schema.json
+docs/interop/qemu-ga-qapi.texi: $(SRC_PATH)/qapi/qga-schema.json
 	$(call quiet-command,$(PYTHON_UTF8) $(SRC_PATH)/scripts/qapi2texi.py $< > $@,"GEN","$@")

 qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi qemu-monitor-info.texi
diff --git a/qga/qapi-schema.json b/qapi/qga-schema.json
similarity index 100%
rename from qga/qapi-schema.json
rename to qapi/qga-schema.json
diff --git a/qapi-schema.json b/qapi/qmp-schema.json
similarity index 99%
rename from qapi-schema.json
rename to qapi/qmp-schema.json
index 5c06745c792..daf748a60ba 100644
--- a/qapi-schema.json
+++ b/qapi/qmp-schema.json
@@ -76,22 +76,22 @@
 # included sub-schemas inserted at the first include directive
 # (subsequent include directives have no effect).  To get a sane and
 # stable order, it's best to include each sub-schema just once, or
-# include it first in qapi-schema.json.
+# include it first in qapi/qmp-schema.json.

-{ 'include': 'qapi/common.json' }
-{ 'include': 'qapi/sockets.json' }
-{ 'include': 'qapi/run-state.json' }
-{ 'include': 'qapi/crypto.json' }
-{ 'include': 'qapi/block.json' }
-{ 'include': 'qapi/char.json' }
-{ 'include': 'qapi/net.json' }
-{ 'include': 'qapi/rocker.json' }
-{ 'include': 'qapi/tpm.json' }
-{ 'include': 'qapi/ui.json' }
-{ 'include': 'qapi/migration.json' }
-{ 'include': 'qapi/transaction.json' }
-{ 'include': 'qapi/trace.json' }
-{ 'include': 'qapi/introspect.json' }
+{ 'include': 'common.json' }
+{ 'include': 'sockets.json' }
+{ 'include': 'run-state.json' }
+{ 'include': 'crypto.json' }
+{ 'include': 'block.json' }
+{ 'include': 'char.json' }
+{ 'include': 'net.json' }
+{ 'include': 'rocker.json' }
+{ 'include': 'tpm.json' }
+{ 'include': 'ui.json' }
+{ 'include': 'migration.json' }
+{ 'include': 'transaction.json' }
+{ 'include': 'trace.json' }
+{ 'include': 'introspect.json' }

 ##
 # = Miscellanea
@@ -1710,7 +1710,7 @@
 #
 # Emitted when background dump has completed
 #
-# @result: DumpQueryResult type described in qapi-schema.json.
+# @result: DumpQueryResult type.
 #
 # @error: human-readable error string that provides
 #         hint on why dump failed. Only presents on failure. The
@@ -2925,7 +2925,7 @@
 #
 # Emitted when guest executes ACPI _OST method.
 #
-# @info: ACPIOSTInfo type as described in qapi-schema.json
+# @info: ACPIOSTInfo type.
 #
 # Since: 2.1
 #
diff --git a/tpm.c b/tpm.c
index d11b10bed86..9440ce29899 100644
--- a/tpm.c
+++ b/tpm.c
@@ -182,7 +182,7 @@ int tpm_config_parse(QemuOptsList *opts_list, const char *optarg)

 /*
  * Walk the list of active TPM backends and collect information about them
- * following the schema description in qapi-schema.json.
+ * following the QAPI schema description.
  */
 TPMInfoList *qmp_query_tpm(Error **errp)
 {
diff --git a/MAINTAINERS b/MAINTAINERS
index 54feb956467..b5960869eb5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1543,7 +1543,6 @@ QAPI Schema
 M: Eric Blake <eblake@redhat.com>
 M: Markus Armbruster <armbru@redhat.com>
 S: Supported
-F: qapi-schema.json
 F: qapi/*.json
 T: git git://repo.or.cz/qemu/armbru.git qapi-next

@@ -1565,6 +1564,7 @@ QEMU Guest Agent
 M: Michael Roth <mdroth@linux.vnet.ibm.com>
 S: Maintained
 F: qga/
+F: qapi/qga-schema.json
 F: qemu-ga.texi
 F: scripts/qemu-guest-agent/
 F: tests/test-qga.c
-- 
2.14.3

  parent reply	other threads:[~2018-02-11  0:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-11  0:40 [Qemu-devel] [PATCH 0/3] QAPI file renames Eric Blake
2018-02-11  0:40 ` [Qemu-devel] [PATCH 1/3] qapi: Pass '-u' when doing non-silent diff Eric Blake
2018-02-11  4:11   ` Philippe Mathieu-Daudé
2018-02-11 12:04   ` Markus Armbruster
2018-02-12 16:10     ` Eric Blake
2018-02-11  0:40 ` Eric Blake [this message]
2018-02-11  9:49   ` [Qemu-devel] [PATCH 2/3] qapi: Rename QMP and QGA schema files Markus Armbruster
2018-02-12 16:12     ` Eric Blake
2018-02-15 19:03       ` Michael Roth
2018-02-11  0:40 ` [Qemu-devel] [PATCH 3/3] qapi: Rename .json to .qapi Eric Blake
2018-02-12  9:52   ` Daniel P. Berrangé
2018-02-12 10:17     ` Marc-André Lureau
2018-02-23 17:15       ` Markus Armbruster
2018-02-11  9:44 ` [Qemu-devel] [PATCH 0/3] QAPI file renames Markus Armbruster
2018-02-12 16:13   ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180211004013.10784-3-eblake@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanb@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.