Fix code-block JSON format issues
Sphinx 2.0 is more strict on enforcing proper format for the specified code type. This resulted in a few warnings due to JSON code blocks not being valid JSON. This cleans up a few cases that were not properly formatted. Closes-bug: #1822891 Change-Id: Id6fa50b759add5d2286b98f1752a7ff92bf0515d Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
parent
1dec92ed8f
commit
e27d781455
@ -144,7 +144,7 @@ class AttachmentsController(wsgi.Controller):
|
|||||||
"connector":
|
"connector":
|
||||||
{
|
{
|
||||||
"initiator": "iqn.1993-08.org.debian:01:cad181614cec",
|
"initiator": "iqn.1993-08.org.debian:01:cad181614cec",
|
||||||
"ip":"192.168.1.20",
|
"ip": "192.168.1.20",
|
||||||
"platform": "x86_64",
|
"platform": "x86_64",
|
||||||
"host": "tempest-1",
|
"host": "tempest-1",
|
||||||
"os_type": "linux2",
|
"os_type": "linux2",
|
||||||
@ -215,13 +215,13 @@ class AttachmentsController(wsgi.Controller):
|
|||||||
"connector":
|
"connector":
|
||||||
{
|
{
|
||||||
"initiator": "iqn.1993-08.org.debian:01:cad181614cec",
|
"initiator": "iqn.1993-08.org.debian:01:cad181614cec",
|
||||||
"ip":"192.168.1.20",
|
"ip": "192.168.1.20",
|
||||||
"platform": "x86_64",
|
"platform": "x86_64",
|
||||||
"host": "tempest-1",
|
"host": "tempest-1",
|
||||||
"os_type": "linux2",
|
"os_type": "linux2",
|
||||||
"multipath": False,
|
"multipath": false,
|
||||||
"mountpoint": "/dev/vdb",
|
"mountpoint": "/dev/vdb",
|
||||||
"mode": None|"rw"|"ro",
|
"mode": "None|rw|ro"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1743,40 +1743,42 @@ class VolumeManager(manager.CleanableManager,
|
|||||||
This method calls the driver initialize_connection and returns
|
This method calls the driver initialize_connection and returns
|
||||||
it to the caller. The connector parameter is a dictionary with
|
it to the caller. The connector parameter is a dictionary with
|
||||||
information about the host that will connect to the volume in the
|
information about the host that will connect to the volume in the
|
||||||
following format::
|
following format:
|
||||||
|
|
||||||
.. code:: json
|
.. code:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
'ip': ip,
|
"ip": "<ip>",
|
||||||
'initiator': initiator,
|
"initiator": "<initiator>"
|
||||||
}
|
}
|
||||||
|
|
||||||
ip: the ip address of the connecting machine
|
ip:
|
||||||
|
the ip address of the connecting machine
|
||||||
|
|
||||||
initiator: the iscsi initiator name of the connecting machine.
|
initiator:
|
||||||
This can be None if the connecting machine does not support iscsi
|
the iscsi initiator name of the connecting machine. This can be
|
||||||
connections.
|
None if the connecting machine does not support iscsi connections.
|
||||||
|
|
||||||
driver is responsible for doing any necessary security setup and
|
driver is responsible for doing any necessary security setup and
|
||||||
returning a connection_info dictionary in the following format::
|
returning a connection_info dictionary in the following format:
|
||||||
|
|
||||||
.. code:: json
|
.. code:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
'driver_volume_type': driver_volume_type,
|
"driver_volume_type": "<driver_volume_type>",
|
||||||
'data': data,
|
"data": "<data>"
|
||||||
}
|
}
|
||||||
|
|
||||||
driver_volume_type: a string to identify the type of volume. This
|
driver_volume_type:
|
||||||
can be used by the calling code to determine the
|
a string to identify the type of volume. This can be used by the
|
||||||
strategy for connecting to the volume. This could
|
calling code to determine the strategy for connecting to the
|
||||||
be 'iscsi', 'rbd', 'sheepdog', etc.
|
volume. This could be 'iscsi', 'rbd', 'sheepdog', etc.
|
||||||
|
|
||||||
|
data:
|
||||||
|
this is the data that the calling code will use to connect to the
|
||||||
|
volume. Keep in mind that this will be serialized to json in
|
||||||
|
various places, so it should not contain any non-json data types.
|
||||||
|
|
||||||
data: this is the data that the calling code will use to connect
|
|
||||||
to the volume. Keep in mind that this will be serialized to
|
|
||||||
json in various places, so it should not contain any non-json
|
|
||||||
data types.
|
|
||||||
"""
|
"""
|
||||||
# NOTE(flaper87): Verify the driver is enabled
|
# NOTE(flaper87): Verify the driver is enabled
|
||||||
# before going forward. The exception will be caught
|
# before going forward. The exception will be caught
|
||||||
@ -4921,31 +4923,29 @@ class VolumeManager(manager.CleanableManager,
|
|||||||
.. code:: json
|
.. code:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
'replication_targets': [
|
"replication_targets": [
|
||||||
{
|
{
|
||||||
'backend_id': 'vendor-id-1',
|
"backend_id": "vendor-id-1",
|
||||||
'unique_key': 'val1',
|
"unique_key": "val1"
|
||||||
......
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'backend_id': 'vendor-id-2',
|
"backend_id": "vendor-id-2",
|
||||||
'unique_key': 'val2',
|
"unique_key": "val2"
|
||||||
......
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
Response example for non-admin:
|
Response example for non-admin:
|
||||||
|
|
||||||
.. code json
|
.. code:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
'replication_targets': [
|
"replication_targets": [
|
||||||
{
|
{
|
||||||
'backend_id': 'vendor-id-1'
|
"backend_id": "vendor-id-1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'backend_id': 'vendor-id-2'
|
"backend_id": "vendor-id-2"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user