Blame 0002-docs-bitmaps-use-QMP-lexer-instead-of-json.patch

e0a72f
From f5068276729f5c3288ebd9cc29f18e9e04f643c9 Mon Sep 17 00:00:00 2001
e0a72f
From: John Snow <jsnow@redhat.com>
e0a72f
Date: Wed, 10 Jul 2019 15:08:07 -0400
e0a72f
Subject: [PATCH] docs/bitmaps: use QMP lexer instead of json
e0a72f
e0a72f
The annotated style json we use in QMP documentation is not strict json
e0a72f
and depending on the version of Sphinx (2.0+) or Pygments installed,
e0a72f
might cause the build to fail.
e0a72f
e0a72f
Use the new QMP lexer.
e0a72f
e0a72f
Further, some versions of Sphinx can not apply custom lexers to "code"
e0a72f
directives and require the use of "code-block" directives instead, so
e0a72f
make that change at this time as well.
e0a72f
e0a72f
Tested under:
e0a72f
- Sphinx 1.3.6 and Pygments 2.4
e0a72f
- Sphinx 1.7.6 and Pygments 2.2 (Fedora 29 packages)
e0a72f
- Sphinx 2.0.1 and Pygments 2.4
e0a72f
- Sphinx 3.0.0+/f396b3a783 and Pygments 2.4 (From Sphinx git c4f44bdd)
e0a72f
e0a72f
Reported-by: Aarushi Mehta <mehta.aaru20@gmail.com>
e0a72f
Signed-off-by: John Snow <jsnow@redhat.com>
e0a72f
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
e0a72f
Message-id: 20190603214653.29369-4-jsnow@redhat.com
e0a72f
Signed-off-by: John Snow <jsnow@redhat.com>
e0a72f
(cherry picked from commit a7786bfb0effe0b4b0fc61d8a8cd307c0b739ed7)
e0a72f
---
e0a72f
 docs/interop/bitmaps.rst | 54 ++++++++++++++++++++--------------------
e0a72f
 1 file changed, 27 insertions(+), 27 deletions(-)
e0a72f
e0a72f
diff --git a/docs/interop/bitmaps.rst b/docs/interop/bitmaps.rst
e0a72f
index 510e8809a9..cf308f197b 100644
e0a72f
--- a/docs/interop/bitmaps.rst
e0a72f
+++ b/docs/interop/bitmaps.rst
e0a72f
@@ -199,7 +199,7 @@ persistence, and recording state can be adjusted at creation time.
e0a72f
 
e0a72f
  to create a new, actively recording persistent bitmap:
e0a72f
 
e0a72f
- .. code:: json
e0a72f
+ .. code-block:: QMP
e0a72f
 
e0a72f
   -> { "execute": "block-dirty-bitmap-add",
e0a72f
        "arguments": {
e0a72f
@@ -220,7 +220,7 @@ persistence, and recording state can be adjusted at creation time.
e0a72f
  To create a new, disabled (``-recording``), transient bitmap that tracks
e0a72f
  changes in 32KiB segments:
e0a72f
 
e0a72f
- .. code:: json
e0a72f
+ .. code-block:: QMP
e0a72f
 
e0a72f
   -> { "execute": "block-dirty-bitmap-add",
e0a72f
        "arguments": {
e0a72f
@@ -254,7 +254,7 @@ Deletes a bitmap. Bitmaps that are ``+busy`` cannot be removed.
e0a72f
 
e0a72f
  Remove a bitmap named ``bitmap0`` from node ``drive0``:
e0a72f
 
e0a72f
- .. code:: json
e0a72f
+ .. code-block:: QMP
e0a72f
 
e0a72f
   -> { "execute": "block-dirty-bitmap-remove",
e0a72f
        "arguments": {
e0a72f
@@ -280,7 +280,7 @@ Clears all dirty bits from a bitmap. ``+busy`` bitmaps cannot be cleared.
e0a72f
 
e0a72f
  Clear all dirty bits from bitmap ``bitmap0`` on node ``drive0``:
e0a72f
 
e0a72f
- .. code:: json
e0a72f
+ .. code-block:: QMP
e0a72f
 
e0a72f
   -> { "execute": "block-dirty-bitmap-clear",
e0a72f
        "arguments": {
e0a72f
@@ -309,7 +309,7 @@ begin being recorded. ``+busy`` bitmaps cannot be enabled.
e0a72f
 
e0a72f
  To set ``+recording`` on bitmap ``bitmap0`` on node ``drive0``:
e0a72f
 
e0a72f
- .. code:: json
e0a72f
+ .. code-block:: QMP
e0a72f
 
e0a72f
   -> { "execute": "block-dirty-bitmap-enable",
e0a72f
        "arguments": {
e0a72f
@@ -347,7 +347,7 @@ writes to begin being ignored. ``+busy`` bitmaps cannot be disabled.
e0a72f
 
e0a72f
  To set ``-recording`` on bitmap ``bitmap0`` on node ``drive0``:
e0a72f
 
e0a72f
- .. code:: json
e0a72f
+ .. code-block:: QMP
e0a72f
 
e0a72f
   -> { "execute": "block-dirty-bitmap-disable",
e0a72f
        "arguments": {
e0a72f
@@ -393,7 +393,7 @@ in any one source bitmap, the target bitmap will mark that segment dirty.
e0a72f
  ``drive0``. If ``new_bitmap`` was empty prior to this command, this achieves
e0a72f
  a copy.
e0a72f
 
e0a72f
- .. code:: json
e0a72f
+ .. code-block:: QMP
e0a72f
 
e0a72f
   -> { "execute": "block-dirty-bitmap-merge",
e0a72f
        "arguments": {
e0a72f
@@ -424,7 +424,7 @@ attached to nodes serving as the root for guest devices.
e0a72f
  API. This result highlights a bitmap ``bitmap0`` attached to the root node of
e0a72f
  device ``drive0``.
e0a72f
 
e0a72f
- .. code:: json
e0a72f
+ .. code-block:: QMP
e0a72f
 
e0a72f
   -> {
e0a72f
        "execute": "query-block",
e0a72f
@@ -562,7 +562,7 @@ new, empty bitmap that records writes from this point in time forward.
e0a72f
           destination. These writes will be recorded in the bitmap
e0a72f
           accordingly.
e0a72f
 
e0a72f
-.. code:: json
e0a72f
+.. code-block:: QMP
e0a72f
 
e0a72f
   -> {
e0a72f
        "execute": "transaction",
e0a72f
@@ -650,7 +650,7 @@ Example: Resetting an Incremental Backup Anchor Point
e0a72f
 If we want to start a new backup chain with an existing bitmap, we can also
e0a72f
 use a transaction to reset the bitmap while making a new full backup:
e0a72f
 
e0a72f
-.. code:: json
e0a72f
+.. code-block:: QMP
e0a72f
 
e0a72f
   -> {
e0a72f
        "execute": "transaction",
e0a72f
@@ -730,7 +730,7 @@ Example: First Incremental Backup
e0a72f
 
e0a72f
 #. Issue an incremental backup command:
e0a72f
 
e0a72f
-   .. code:: json
e0a72f
+   .. code-block:: QMP
e0a72f
 
e0a72f
     -> {
e0a72f
          "execute": "drive-backup",
e0a72f
@@ -788,7 +788,7 @@ Example: Second Incremental Backup
e0a72f
 #. Issue a new incremental backup command. The only difference here is that we
e0a72f
    have changed the target image below.
e0a72f
 
e0a72f
-   .. code:: json
e0a72f
+   .. code-block:: QMP
e0a72f
 
e0a72f
     -> {
e0a72f
          "execute": "drive-backup",
e0a72f
@@ -869,7 +869,7 @@ image:
e0a72f
 #. Issue a new incremental backup command. Apart from the new destination
e0a72f
    image, there is no difference from the last two examples.
e0a72f
 
e0a72f
-   .. code:: json
e0a72f
+   .. code-block:: QMP
e0a72f
 
e0a72f
     -> {
e0a72f
          "execute": "drive-backup",
e0a72f
@@ -932,7 +932,7 @@ point in time.
e0a72f
 
e0a72f
 #. Create a full (anchor) backup for each drive, with accompanying bitmaps:
e0a72f
 
e0a72f
-   .. code:: json
e0a72f
+   .. code-block:: QMP
e0a72f
 
e0a72f
     -> {
e0a72f
          "execute": "transaction",
e0a72f
@@ -1018,7 +1018,7 @@ point in time.
e0a72f
 
e0a72f
 #. Issue a multi-drive incremental push backup transaction:
e0a72f
 
e0a72f
-   .. code:: json
e0a72f
+   .. code-block:: QMP
e0a72f
 
e0a72f
     -> {
e0a72f
          "execute": "transaction",
e0a72f
@@ -1121,7 +1121,7 @@ described above. This example demonstrates the single-job failure case:
e0a72f
 
e0a72f
 #. Attempt to create an incremental backup via QMP:
e0a72f
 
e0a72f
-   .. code:: json
e0a72f
+   .. code-block:: QMP
e0a72f
 
e0a72f
     -> {
e0a72f
          "execute": "drive-backup",
e0a72f
@@ -1139,7 +1139,7 @@ described above. This example demonstrates the single-job failure case:
e0a72f
 
e0a72f
 #. Receive a pair of events indicating failure:
e0a72f
 
e0a72f
-   .. code:: json
e0a72f
+   .. code-block:: QMP
e0a72f
 
e0a72f
     <- {
e0a72f
          "timestamp": {...},
e0a72f
@@ -1175,7 +1175,7 @@ described above. This example demonstrates the single-job failure case:
e0a72f
 #. Retry the command after fixing the underlying problem, such as
e0a72f
    freeing up space on the backup volume:
e0a72f
 
e0a72f
-   .. code:: json
e0a72f
+   .. code-block:: QMP
e0a72f
 
e0a72f
     -> {
e0a72f
          "execute": "drive-backup",
e0a72f
@@ -1193,7 +1193,7 @@ described above. This example demonstrates the single-job failure case:
e0a72f
 
e0a72f
 #. Receive confirmation that the job completed successfully:
e0a72f
 
e0a72f
-   .. code:: json
e0a72f
+   .. code-block:: QMP
e0a72f
 
e0a72f
     <- {
e0a72f
          "timestamp": {...},
e0a72f
@@ -1233,7 +1233,7 @@ and one succeeds:
e0a72f
 
e0a72f
 #. Issue the transaction to start a backup of both drives.
e0a72f
 
e0a72f
-   .. code:: json
e0a72f
+   .. code-block:: QMP
e0a72f
 
e0a72f
     -> {
e0a72f
          "execute": "transaction",
e0a72f
@@ -1267,13 +1267,13 @@ and one succeeds:
e0a72f
 #. Receive notice that the Transaction was accepted, and jobs were
e0a72f
    launched:
e0a72f
 
e0a72f
-   .. code:: json
e0a72f
+   .. code-block:: QMP
e0a72f
 
e0a72f
     <- { "return": {} }
e0a72f
 
e0a72f
 #. Receive notice that the first job has completed:
e0a72f
 
e0a72f
-   .. code:: json
e0a72f
+   .. code-block:: QMP
e0a72f
 
e0a72f
     <- {
e0a72f
          "timestamp": {...},
e0a72f
@@ -1289,7 +1289,7 @@ and one succeeds:
e0a72f
 
e0a72f
 #. Receive notice that the second job has failed:
e0a72f
 
e0a72f
-   .. code:: json
e0a72f
+   .. code-block:: QMP
e0a72f
 
e0a72f
     <- {
e0a72f
          "timestamp": {...},
e0a72f
@@ -1365,7 +1365,7 @@ applied:
e0a72f
 
e0a72f
 #. Issue the multi-drive incremental backup transaction:
e0a72f
 
e0a72f
-   .. code:: json
e0a72f
+   .. code-block:: QMP
e0a72f
 
e0a72f
     -> {
e0a72f
          "execute": "transaction",
e0a72f
@@ -1401,13 +1401,13 @@ applied:
e0a72f
 
e0a72f
 #. Receive notice that the Transaction was accepted, and jobs were launched:
e0a72f
 
e0a72f
-   .. code:: json
e0a72f
+   .. code-block:: QMP
e0a72f
 
e0a72f
     <- { "return": {} }
e0a72f
 
e0a72f
 #. Receive notification that the backup job for ``drive1`` has failed:
e0a72f
 
e0a72f
-   .. code:: json
e0a72f
+   .. code-block:: QMP
e0a72f
 
e0a72f
     <- {
e0a72f
          "timestamp": {...},
e0a72f
@@ -1434,7 +1434,7 @@ applied:
e0a72f
 
e0a72f
 #. Receive notification that the job for ``drive0`` has been cancelled:
e0a72f
 
e0a72f
-   .. code:: json
e0a72f
+   .. code-block:: QMP
e0a72f
 
e0a72f
     <- {
e0a72f
          "timestamp": {...}