Add API for volume resources to api-ref
This patch adds API for volume resources to api-ref. Partial-Bug: 1526231 Change-Id: I986860cffd344f5cea9f8f5a2f845f77bf6e9e54
This commit is contained in:
parent
5187e80f03
commit
7317c17e4e
@ -20,6 +20,8 @@ DOC_NODE_UUID="6d85703a-565d-469a-96ce-30b6de53079d"
|
|||||||
DOC_DYNAMIC_NODE_UUID="2b045129-a906-46af-bc1a-092b294b3428"
|
DOC_DYNAMIC_NODE_UUID="2b045129-a906-46af-bc1a-092b294b3428"
|
||||||
DOC_PORT_UUID="d2b30520-907d-46c8-bfee-c5586e6fb3a1"
|
DOC_PORT_UUID="d2b30520-907d-46c8-bfee-c5586e6fb3a1"
|
||||||
DOC_PORTGROUP_UUID="e43c722c-248e-4c6e-8ce8-0d8ff129387a"
|
DOC_PORTGROUP_UUID="e43c722c-248e-4c6e-8ce8-0d8ff129387a"
|
||||||
|
DOC_VOL_CONNECTOR_UUID="9bf93e01-d728-47a3-ad4b-5e66a835037c"
|
||||||
|
DOC_VOL_TARGET_UUID="bd4d008c-7d31-463d-abf9-6c23d9d55f7f"
|
||||||
DOC_PROVISION_UPDATED_AT="2016-08-18T22:28:49.946416+00:00"
|
DOC_PROVISION_UPDATED_AT="2016-08-18T22:28:49.946416+00:00"
|
||||||
DOC_CREATED_AT="2016-08-18T22:28:48.643434+11:11"
|
DOC_CREATED_AT="2016-08-18T22:28:48.643434+11:11"
|
||||||
DOC_UPDATED_AT="2016-08-18T22:28:49.653974+00:00"
|
DOC_UPDATED_AT="2016-08-18T22:28:49.653974+00:00"
|
||||||
@ -256,6 +258,45 @@ POST v1/nodes/$NID/vifs node-vif-attach-request.json
|
|||||||
GET v1/nodes/$NID/vifs > node-vif-list-response.json
|
GET v1/nodes/$NID/vifs > node-vif-list-response.json
|
||||||
|
|
||||||
|
|
||||||
|
#############
|
||||||
|
# VOLUME APIs
|
||||||
|
GET v1/volume/ > volume-list-response.json
|
||||||
|
|
||||||
|
sed -i "s/.*node_uuid.*/ \"node_uuid\": \"$NID\",/" volume-connector-create-request.json
|
||||||
|
POST v1/volume/connectors volume-connector-create-request.json > volume-connector-create-response.json
|
||||||
|
VCID=$(cat volume-connector-create-response.json | grep '"uuid"' | sed 's/.*"\([0-9a-f\-]*\)",*/\1/')
|
||||||
|
if [ "$VCID" == "" ]; then
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Volume connector created. UUID: $VCID"
|
||||||
|
fi
|
||||||
|
|
||||||
|
GET v1/volume/connectors > volume-connector-list-response.json
|
||||||
|
GET v1/volume/connectors?detail=True > volume-connector-list-detail-response.json
|
||||||
|
PATCH v1/volume/connectors/$VCID volume-connector-update-request.json > volume-connector-update-response.json
|
||||||
|
|
||||||
|
sed -i "s/.*node_uuid.*/ \"node_uuid\": \"$NID\",/" volume-target-create-request.json
|
||||||
|
POST v1/volume/targets volume-target-create-request.json > volume-target-create-response.json
|
||||||
|
VTID=$(cat volume-target-create-response.json | grep '"uuid"' | sed 's/.*"\([0-9a-f\-]*\)",*/\1/')
|
||||||
|
if [ "$VTID" == "" ]; then
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "Volume target created. UUID: $VCID"
|
||||||
|
fi
|
||||||
|
|
||||||
|
GET v1/volume/targets > volume-target-list-response.json
|
||||||
|
GET v1/volume/targets?detail=True > volume-target-list-detail-response.json
|
||||||
|
PATCH v1/volume/targets/$VTID volume-target-update-request.json > volume-target-update-response.json
|
||||||
|
|
||||||
|
##################
|
||||||
|
# NODE VOLUME APIs
|
||||||
|
GET v1/nodes/$NID/volume > node-volume-list-response.json
|
||||||
|
GET v1/nodes/$NID/volume/connectors > node-volume-connector-list-response.json
|
||||||
|
GET v1/nodes/$NID/volume/connectors?detail=True > node-volume-connector-detail-response.json
|
||||||
|
GET v1/nodes/$NID/volume/targets > node-volume-target-list-response.json
|
||||||
|
GET v1/nodes/$NID/volume/targets?detail=True > node-volume-target-detail-response.json
|
||||||
|
|
||||||
|
|
||||||
#####################
|
#####################
|
||||||
# Replace automatically generated UUIDs by already used in documentation
|
# Replace automatically generated UUIDs by already used in documentation
|
||||||
sed -i "s/$CID/$DOC_CHASSIS_UUID/" *.json
|
sed -i "s/$CID/$DOC_CHASSIS_UUID/" *.json
|
||||||
@ -263,6 +304,8 @@ sed -i "s/$NID/$DOC_NODE_UUID/" *.json
|
|||||||
sed -i "s/$DNID/$DOC_DYNAMIC_NODE_UUID/" *.json
|
sed -i "s/$DNID/$DOC_DYNAMIC_NODE_UUID/" *.json
|
||||||
sed -i "s/$PID/$DOC_PORT_UUID/" *.json
|
sed -i "s/$PID/$DOC_PORT_UUID/" *.json
|
||||||
sed -i "s/$PGID/$DOC_PORTGROUP_UUID/" *.json
|
sed -i "s/$PGID/$DOC_PORTGROUP_UUID/" *.json
|
||||||
|
sed -i "s/$VCID/$DOC_VOL_CONNECTOR_UUID/" *.json
|
||||||
|
sed -i "s/$VTID/$DOC_VOL_TARGET_UUID/" *.json
|
||||||
sed -i "s/$(hostname)/$DOC_IRONIC_CONDUCTOR_HOSTNAME/" *.json
|
sed -i "s/$(hostname)/$DOC_IRONIC_CONDUCTOR_HOSTNAME/" *.json
|
||||||
sed -i "s/created_at\": \".*\"/created_at\": \"$DOC_CREATED_AT\"/" *.json
|
sed -i "s/created_at\": \".*\"/created_at\": \"$DOC_CREATED_AT\"/" *.json
|
||||||
sed -i "s/updated_at\": \".*\"/updated_at\": \"$DOC_UPDATED_AT\"/" *.json
|
sed -i "s/updated_at\": \".*\"/updated_at\": \"$DOC_UPDATED_AT\"/" *.json
|
||||||
|
140
api-ref/source/baremetal-api-v1-nodes-volume.inc
Normal file
140
api-ref/source/baremetal-api-v1-nodes-volume.inc
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
.. -*- rst -*-
|
||||||
|
|
||||||
|
================================================
|
||||||
|
Listing Volume resources by Node (nodes, volume)
|
||||||
|
================================================
|
||||||
|
|
||||||
|
Given a Node identifier (``uuid`` or ``name``), the API exposes the list of,
|
||||||
|
and details of, all Volume resources associated with that Node.
|
||||||
|
|
||||||
|
These endpoints do not allow modification of the Volume connectors and Volume
|
||||||
|
targets; that should be done by accessing the Volume resources under the
|
||||||
|
``/v1/volume/connectors`` and ``/v1/volume/targets`` endpoint.
|
||||||
|
|
||||||
|
Volume resource was added in API microversion 1.32. If using an older
|
||||||
|
version, all the requests return ``Not Found (404)`` error code.
|
||||||
|
|
||||||
|
|
||||||
|
List Links of Volume Resources by Node
|
||||||
|
======================================
|
||||||
|
|
||||||
|
.. rest_method:: GET /v1/nodes/{node_ident}/volume
|
||||||
|
|
||||||
|
Return a list of links to all volume resources associated with ``node_ident``.
|
||||||
|
|
||||||
|
Normal response code: 200
|
||||||
|
|
||||||
|
Request
|
||||||
|
-------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- node_ident: node_ident
|
||||||
|
|
||||||
|
Response
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- connectors: volume_connectors_link
|
||||||
|
- targets: volume_targets_link
|
||||||
|
- links: links
|
||||||
|
|
||||||
|
**Example Volume list response:**
|
||||||
|
|
||||||
|
.. literalinclude:: samples/node-volume-list-response.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
|
||||||
|
List Volume connectors by Node
|
||||||
|
==============================
|
||||||
|
|
||||||
|
.. rest_method:: GET /v1/nodes/{node_ident}/volume/connectors
|
||||||
|
|
||||||
|
Return a list of bare metal Volume connectors associated with ``node_ident``.
|
||||||
|
|
||||||
|
Normal response code: 200
|
||||||
|
|
||||||
|
Error codes: 400,401,403,404
|
||||||
|
|
||||||
|
Request
|
||||||
|
-------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- node_ident: node_ident
|
||||||
|
- fields: fields
|
||||||
|
- limit: limit
|
||||||
|
- marker: marker
|
||||||
|
- sort_dir: sort_dir
|
||||||
|
- sort_key: sort_key
|
||||||
|
|
||||||
|
Response
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- connectors: volume_connectors
|
||||||
|
- uuid: uuid
|
||||||
|
- type: volume_connector_type
|
||||||
|
- connector_id: volume_connector_connector_id
|
||||||
|
- node_uuid: node_uuid
|
||||||
|
- extra: extra
|
||||||
|
- links: links
|
||||||
|
- next: next
|
||||||
|
|
||||||
|
**Example list of Node's Volume connectors:**
|
||||||
|
|
||||||
|
.. literalinclude:: samples/node-volume-connector-list-response.json
|
||||||
|
|
||||||
|
**Example detailed list of Node's Volume connectors:**
|
||||||
|
|
||||||
|
.. literalinclude:: samples/node-volume-connector-detail-response.json
|
||||||
|
|
||||||
|
|
||||||
|
List Volume targets by Node
|
||||||
|
===========================
|
||||||
|
|
||||||
|
.. rest_method:: GET /v1/nodes/{node_ident}/volume/targets
|
||||||
|
|
||||||
|
Return a list of bare metal Volume targets associated with ``node_ident``.
|
||||||
|
|
||||||
|
Normal response code: 200
|
||||||
|
|
||||||
|
Error codes: 400,401,403,404
|
||||||
|
|
||||||
|
Request
|
||||||
|
-------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- node_ident: node_ident
|
||||||
|
- fields: fields
|
||||||
|
- limit: limit
|
||||||
|
- marker: marker
|
||||||
|
- sort_dir: sort_dir
|
||||||
|
- sort_key: sort_key
|
||||||
|
|
||||||
|
Response
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- targets: volume_targets
|
||||||
|
- uuid: uuid
|
||||||
|
- volume_type: volume_target_volume_type
|
||||||
|
- properties: volume_target_properties
|
||||||
|
- boot_index: volume_target_boot_index
|
||||||
|
- volume_id: volume_target_volume_id
|
||||||
|
- extra: extra
|
||||||
|
- node_uuid: node_uuid
|
||||||
|
- links: links
|
||||||
|
- next: next
|
||||||
|
|
||||||
|
**Example list of Node's Volume targets:**
|
||||||
|
|
||||||
|
.. literalinclude:: samples/node-volume-target-list-response.json
|
||||||
|
|
||||||
|
**Example detailed list of Node's Volume targets:**
|
||||||
|
|
||||||
|
.. literalinclude:: samples/node-volume-target-detail-response.json
|
@ -102,7 +102,7 @@ network_interface field, which was introduced in API microversion 1.20. If this
|
|||||||
field is not supplied when creating the Node, the default value will be used.
|
field is not supplied when creating the Node, the default value will be used.
|
||||||
|
|
||||||
The list and example below are representative of the response as of API
|
The list and example below are representative of the response as of API
|
||||||
microversion 1.31.
|
microversion 1.32.
|
||||||
|
|
||||||
.. rest_parameters:: parameters.yaml
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
@ -142,6 +142,7 @@ microversion 1.31.
|
|||||||
- power_interface: power_interface
|
- power_interface: power_interface
|
||||||
- raid_interface: raid_interface
|
- raid_interface: raid_interface
|
||||||
- vendor_interface: vendor_interface
|
- vendor_interface: vendor_interface
|
||||||
|
- volume: n_volume
|
||||||
|
|
||||||
**Example JSON representation of a Node:**
|
**Example JSON representation of a Node:**
|
||||||
|
|
||||||
@ -285,6 +286,7 @@ Response
|
|||||||
- power_interface: power_interface
|
- power_interface: power_interface
|
||||||
- raid_interface: raid_interface
|
- raid_interface: raid_interface
|
||||||
- vendor_interface: vendor_interface
|
- vendor_interface: vendor_interface
|
||||||
|
- volume: n_volume
|
||||||
|
|
||||||
**Example detailed list of Nodes:**
|
**Example detailed list of Nodes:**
|
||||||
|
|
||||||
@ -354,6 +356,7 @@ Response
|
|||||||
- power_interface: power_interface
|
- power_interface: power_interface
|
||||||
- raid_interface: raid_interface
|
- raid_interface: raid_interface
|
||||||
- vendor_interface: vendor_interface
|
- vendor_interface: vendor_interface
|
||||||
|
- volume: n_volume
|
||||||
|
|
||||||
**Example JSON representation of a Node:**
|
**Example JSON representation of a Node:**
|
||||||
|
|
||||||
@ -432,6 +435,7 @@ Response
|
|||||||
- power_interface: power_interface
|
- power_interface: power_interface
|
||||||
- raid_interface: raid_interface
|
- raid_interface: raid_interface
|
||||||
- vendor_interface: vendor_interface
|
- vendor_interface: vendor_interface
|
||||||
|
- volume: n_volume
|
||||||
|
|
||||||
**Example JSON representation of a Node:**
|
**Example JSON representation of a Node:**
|
||||||
|
|
||||||
|
460
api-ref/source/baremetal-api-v1-volume.inc
Normal file
460
api-ref/source/baremetal-api-v1-volume.inc
Normal file
@ -0,0 +1,460 @@
|
|||||||
|
.. -*- rst -*-
|
||||||
|
|
||||||
|
===============
|
||||||
|
Volume (volume)
|
||||||
|
===============
|
||||||
|
|
||||||
|
Since API version 1.32, information for connecting remote volumes to a node
|
||||||
|
can be associated with a Node. There are two types of resources, Volume
|
||||||
|
connectors and Volume targets. Volume connectors contain initiator information
|
||||||
|
of Nodes. Volume targets contain target information of remote volumes.
|
||||||
|
|
||||||
|
Listing, Searching, Creating, Updating, and Deleting of Volume connector
|
||||||
|
resources are done through the ``v1/volume/connectors`` resource. The same
|
||||||
|
operations for Volume targets are done through the ``v1/volume/targets``
|
||||||
|
resources.
|
||||||
|
|
||||||
|
List Links of Volume Resources
|
||||||
|
==============================
|
||||||
|
|
||||||
|
.. rest_method:: GET /v1/volume
|
||||||
|
|
||||||
|
Return a list of links to all volume resources.
|
||||||
|
|
||||||
|
Normal response code: 200
|
||||||
|
|
||||||
|
Request
|
||||||
|
-------
|
||||||
|
|
||||||
|
Response
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- connectors: volume_connectors_link
|
||||||
|
- targets: volume_targets_link
|
||||||
|
- links: links
|
||||||
|
|
||||||
|
**Example Volume list response:**
|
||||||
|
|
||||||
|
.. literalinclude:: samples/volume-list-response.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
|
||||||
|
List Volume Connectors
|
||||||
|
======================
|
||||||
|
|
||||||
|
.. rest_method:: GET /v1/volume/connectors
|
||||||
|
|
||||||
|
Return a list of Volume connectors for all nodes.
|
||||||
|
|
||||||
|
By default, this query will return the UUID, node UUID, type, and connector ID
|
||||||
|
for each Volume connector.
|
||||||
|
|
||||||
|
|
||||||
|
Normal response code: 200
|
||||||
|
|
||||||
|
Error codes: 400,401,403,404
|
||||||
|
|
||||||
|
Request
|
||||||
|
-------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- node: r_volume_connector_node_ident
|
||||||
|
- fields: fields
|
||||||
|
- detail: detail
|
||||||
|
- limit: limit
|
||||||
|
- marker: marker
|
||||||
|
- sort_dir: sort_dir
|
||||||
|
- sort_key: sort_key
|
||||||
|
|
||||||
|
Response
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- connectors: volume_connectors
|
||||||
|
- uuid: uuid
|
||||||
|
- type: volume_connector_type
|
||||||
|
- connector_id: volume_connector_connector_id
|
||||||
|
- node_uuid: node_uuid
|
||||||
|
- extra: extra
|
||||||
|
- links: links
|
||||||
|
- next: next
|
||||||
|
|
||||||
|
**Example Volume connector list response:**
|
||||||
|
|
||||||
|
.. literalinclude:: samples/volume-connector-list-response.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
**Example detailed Volume connector list response:**
|
||||||
|
|
||||||
|
.. literalinclude:: samples/volume-connector-list-detail-response.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
|
||||||
|
Create Volume Connector
|
||||||
|
=======================
|
||||||
|
|
||||||
|
.. rest_method:: POST /v1/volume/connectors
|
||||||
|
|
||||||
|
Creates a new Volume connector resource.
|
||||||
|
|
||||||
|
This method requires a Node UUID, a connector type and a connector ID.
|
||||||
|
|
||||||
|
Normal response code: 201
|
||||||
|
|
||||||
|
Error codes: 400,401,403,404,409
|
||||||
|
|
||||||
|
Request
|
||||||
|
-------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- node_uuid: node_uuid
|
||||||
|
- type: volume_connector_type
|
||||||
|
- connector_id: volume_connector_connector_id
|
||||||
|
- extra: extra
|
||||||
|
|
||||||
|
**Example Volume connector creation request:**
|
||||||
|
|
||||||
|
.. literalinclude:: samples/volume-connector-create-request.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
Response
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- uuid: uuid
|
||||||
|
- type: volume_connector_type
|
||||||
|
- connector_id: volume_connector_connector_id
|
||||||
|
- node_uuid: node_uuid
|
||||||
|
- extra: extra
|
||||||
|
- links: links
|
||||||
|
|
||||||
|
**Example Volume connector creation response:**
|
||||||
|
|
||||||
|
.. literalinclude:: samples/volume-connector-create-response.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
|
||||||
|
Show Volume Connector Details
|
||||||
|
=============================
|
||||||
|
|
||||||
|
.. rest_method:: GET /v1/volume/connectors/{volume_connector_id}
|
||||||
|
|
||||||
|
Show details for the given Volume connector.
|
||||||
|
|
||||||
|
Normal response code: 200
|
||||||
|
|
||||||
|
Error codes: 400,401,403,404
|
||||||
|
|
||||||
|
Request
|
||||||
|
-------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- volume_connector_id: volume_connector_id
|
||||||
|
- fields: fields
|
||||||
|
|
||||||
|
Response
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- uuid: uuid
|
||||||
|
- type: volume_connector_type
|
||||||
|
- connector_id: volume_connector_connector_id
|
||||||
|
- node_uuid: node_uuid
|
||||||
|
- extra: extra
|
||||||
|
- links: links
|
||||||
|
|
||||||
|
**Example Volume connector details:**
|
||||||
|
|
||||||
|
.. literalinclude:: samples/volume-connector-create-response.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
|
||||||
|
Update a Volume Connector
|
||||||
|
=========================
|
||||||
|
|
||||||
|
.. rest_method:: PATCH /v1/volume/connectors/{volume_connector_id}
|
||||||
|
|
||||||
|
Update a Volume connector.
|
||||||
|
|
||||||
|
A Volume connector can be updated only while a node associated with the Volume
|
||||||
|
connector is powered off.
|
||||||
|
|
||||||
|
Normal response code: 200
|
||||||
|
|
||||||
|
Error codes: 400,401,403,404,409
|
||||||
|
|
||||||
|
Request
|
||||||
|
-------
|
||||||
|
|
||||||
|
The BODY of the PATCH request must be a JSON PATCH document, adhering to
|
||||||
|
`RFC 6902 <https://tools.ietf.org/html/rfc6902>`_.
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- volume_connector_id: volume_connector_id
|
||||||
|
|
||||||
|
**Example Volume connector update request:**
|
||||||
|
|
||||||
|
.. literalinclude:: samples/volume-connector-update-request.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
Response
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- uuid: uuid
|
||||||
|
- type: volume_connector_type
|
||||||
|
- connector_id: volume_connector_connector_id
|
||||||
|
- node_uuid: node_uuid
|
||||||
|
- extra: extra
|
||||||
|
- links: links
|
||||||
|
|
||||||
|
**Example Volume connector update response:**
|
||||||
|
|
||||||
|
.. literalinclude:: samples/volume-connector-update-response.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
|
||||||
|
Delete Volume Connector
|
||||||
|
=======================
|
||||||
|
|
||||||
|
.. rest_method:: DELETE /v1/volume/connector/{volume_connector_id}
|
||||||
|
|
||||||
|
Delete a Volume connector.
|
||||||
|
|
||||||
|
A Volume connector can be deleted only while a node associated with the Volume
|
||||||
|
connector is powered off.
|
||||||
|
|
||||||
|
Normal response code: 204
|
||||||
|
|
||||||
|
Error codes: 400,401,403,404,409
|
||||||
|
|
||||||
|
Request
|
||||||
|
-------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- volume_connector_id: volume_connector_id
|
||||||
|
|
||||||
|
List Volume Targets
|
||||||
|
===================
|
||||||
|
|
||||||
|
.. rest_method:: GET /v1/volume/targets
|
||||||
|
|
||||||
|
Return a list of Volume targets for all nodes.
|
||||||
|
|
||||||
|
By default, this query will return the UUID, node UUID, volume type, boot
|
||||||
|
index, and volume ID for each Volume target.
|
||||||
|
|
||||||
|
|
||||||
|
Normal response code: 200
|
||||||
|
|
||||||
|
Error codes: 400,401,403,404
|
||||||
|
|
||||||
|
Request
|
||||||
|
-------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- node: r_volume_target_node_ident
|
||||||
|
- fields: fields
|
||||||
|
- detail: detail
|
||||||
|
- limit: limit
|
||||||
|
- marker: marker
|
||||||
|
- sort_dir: sort_dir
|
||||||
|
- sort_key: sort_key
|
||||||
|
|
||||||
|
Response
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- targets: volume_targets
|
||||||
|
- uuid: uuid
|
||||||
|
- volume_type: volume_target_volume_type
|
||||||
|
- properties: volume_target_properties
|
||||||
|
- boot_index: volume_target_boot_index
|
||||||
|
- volume_id: volume_target_volume_id
|
||||||
|
- extra: extra
|
||||||
|
- node_uuid: node_uuid
|
||||||
|
- links: links
|
||||||
|
- next: next
|
||||||
|
|
||||||
|
**Example Volume target list response:**
|
||||||
|
|
||||||
|
.. literalinclude:: samples/volume-target-list-response.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
**Example detailed Volume target list response:**
|
||||||
|
|
||||||
|
.. literalinclude:: samples/volume-target-list-detail-response.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
|
||||||
|
Create Volume Target
|
||||||
|
====================
|
||||||
|
|
||||||
|
.. rest_method:: POST /v1/volume/targets
|
||||||
|
|
||||||
|
Creates a new Volume target resource.
|
||||||
|
|
||||||
|
This method requires a Node UUID, volume type, volume ID, and boot index..
|
||||||
|
|
||||||
|
Normal response code: 201
|
||||||
|
|
||||||
|
Error codes: 400,401,403,404,409
|
||||||
|
|
||||||
|
Request
|
||||||
|
-------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- node_uuid: node_uuid
|
||||||
|
- volume_type: volume_target_volume_type
|
||||||
|
- properties: volume_target_properties
|
||||||
|
- boot_index: volume_target_boot_index
|
||||||
|
- volume_id: volume_target_volume_id
|
||||||
|
- extra: extra
|
||||||
|
|
||||||
|
**Example Volume target creation request:**
|
||||||
|
|
||||||
|
.. literalinclude:: samples/volume-target-create-request.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
Response
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- uuid: uuid
|
||||||
|
- volume_type: volume_target_volume_type
|
||||||
|
- properties: volume_target_properties
|
||||||
|
- boot_index: volume_target_boot_index
|
||||||
|
- volume_id: volume_target_volume_id
|
||||||
|
- extra: extra
|
||||||
|
- node_uuid: node_uuid
|
||||||
|
- links: links
|
||||||
|
|
||||||
|
**Example Volume target creation response:**
|
||||||
|
|
||||||
|
.. literalinclude:: samples/volume-target-create-response.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
|
||||||
|
Show Volume Target Details
|
||||||
|
==========================
|
||||||
|
|
||||||
|
.. rest_method:: GET /v1/volume/targets/{volume_target_id}
|
||||||
|
|
||||||
|
Show details for the given Volume target.
|
||||||
|
|
||||||
|
Normal response code: 200
|
||||||
|
|
||||||
|
Error codes: 400,401,403,404
|
||||||
|
|
||||||
|
Request
|
||||||
|
-------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- volume_target_id: volume_target_id
|
||||||
|
- fields: fields
|
||||||
|
|
||||||
|
Response
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- uuid: uuid
|
||||||
|
- volume_type: volume_target_volume_type
|
||||||
|
- properties: volume_target_properties
|
||||||
|
- boot_index: volume_target_boot_index
|
||||||
|
- volume_id: volume_target_volume_id
|
||||||
|
- extra: extra
|
||||||
|
- node_uuid: node_uuid
|
||||||
|
- links: links
|
||||||
|
|
||||||
|
**Example Volume target details:**
|
||||||
|
|
||||||
|
.. literalinclude:: samples/volume-target-create-response.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
|
||||||
|
Update a Volume Target
|
||||||
|
======================
|
||||||
|
|
||||||
|
.. rest_method:: PATCH /v1/volume/targets/{volume_target_id}
|
||||||
|
|
||||||
|
Update a Volume target.
|
||||||
|
|
||||||
|
A Volume target can be updated only while a node associated with the Volume
|
||||||
|
target is powered off.
|
||||||
|
|
||||||
|
Normal response code: 200
|
||||||
|
|
||||||
|
Error codes: 400,401,403,404,409
|
||||||
|
|
||||||
|
Request
|
||||||
|
-------
|
||||||
|
|
||||||
|
The BODY of the PATCH request must be a JSON PATCH document, adhering to
|
||||||
|
`RFC 6902 <https://tools.ietf.org/html/rfc6902>`_.
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- volume_target_id: volume_target_id
|
||||||
|
|
||||||
|
**Example Volume target update request:**
|
||||||
|
|
||||||
|
.. literalinclude:: samples/volume-target-update-request.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
Response
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- uuid: uuid
|
||||||
|
- volume_type: volume_target_volume_type
|
||||||
|
- properties: volume_target_properties
|
||||||
|
- boot_index: volume_target_boot_index
|
||||||
|
- volume_id: volume_target_volume_id
|
||||||
|
- extra: extra
|
||||||
|
- node_uuid: node_uuid
|
||||||
|
- links: links
|
||||||
|
|
||||||
|
**Example Volume target update response:**
|
||||||
|
|
||||||
|
.. literalinclude:: samples/volume-target-update-response.json
|
||||||
|
:language: javascript
|
||||||
|
|
||||||
|
|
||||||
|
Delete Volume Target
|
||||||
|
====================
|
||||||
|
|
||||||
|
.. rest_method:: DELETE /v1/volume/target/{volume_target_id}
|
||||||
|
|
||||||
|
Delete a Volume target.
|
||||||
|
|
||||||
|
A Volume target can be deleted only while a node associated with the Volume
|
||||||
|
target is powered off.
|
||||||
|
|
||||||
|
Normal response code: 204
|
||||||
|
|
||||||
|
Error codes: 400,401,403,404,409
|
||||||
|
|
||||||
|
Request
|
||||||
|
-------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- volume_target_id: volume_target_id
|
@ -16,6 +16,8 @@
|
|||||||
.. include:: baremetal-api-v1-ports.inc
|
.. include:: baremetal-api-v1-ports.inc
|
||||||
.. include:: baremetal-api-v1-nodes-ports.inc
|
.. include:: baremetal-api-v1-nodes-ports.inc
|
||||||
.. include:: baremetal-api-v1-portgroups-ports.inc
|
.. include:: baremetal-api-v1-portgroups-ports.inc
|
||||||
|
.. include:: baremetal-api-v1-volume.inc
|
||||||
|
.. include:: baremetal-api-v1-nodes-volume.inc
|
||||||
.. include:: baremetal-api-v1-drivers.inc
|
.. include:: baremetal-api-v1-drivers.inc
|
||||||
.. include:: baremetal-api-v1-driver-passthru.inc
|
.. include:: baremetal-api-v1-driver-passthru.inc
|
||||||
.. include:: baremetal-api-v1-chassis.inc
|
.. include:: baremetal-api-v1-chassis.inc
|
||||||
|
@ -74,7 +74,18 @@ portgroup_ident:
|
|||||||
in: path
|
in: path
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
volume_connector_id:
|
||||||
|
description: |
|
||||||
|
The UUID of the Volume connector.
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
volume_target_id:
|
||||||
|
description: |
|
||||||
|
The UUID of the Volume target.
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
callback_url:
|
callback_url:
|
||||||
description: |
|
description: |
|
||||||
@ -84,6 +95,14 @@ callback_url:
|
|||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
detail:
|
||||||
|
description: |
|
||||||
|
Whether to show detailed information about the resource. This cannot be
|
||||||
|
set to True if ``fields`` parameter is specified.
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
|
||||||
# variables in driver query string
|
# variables in driver query string
|
||||||
driver_detail:
|
driver_detail:
|
||||||
description: |
|
description: |
|
||||||
@ -248,6 +267,22 @@ r_resource_class:
|
|||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
r_volume_connector_node_ident:
|
||||||
|
description: |
|
||||||
|
Filter the list of returned Volume connectors, and only return the ones
|
||||||
|
associated with this specific node (name or UUID), or an empty set if not
|
||||||
|
found. Added in API microversion 1.32.
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
r_volume_target_node_ident:
|
||||||
|
description: |
|
||||||
|
Filter the list of returned Volume targets, and only return the ones
|
||||||
|
associated with this specific node (name or UUID), or an empty set if not
|
||||||
|
found. Added in API microversion 1.32.
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
sort_dir:
|
sort_dir:
|
||||||
description: |
|
description: |
|
||||||
Sorts the response by the requested sort
|
Sorts the response by the requested sort
|
||||||
@ -679,6 +714,12 @@ n_vifs:
|
|||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: array
|
type: array
|
||||||
|
n_volume:
|
||||||
|
description: |
|
||||||
|
Links to the volume resources. Added in API microversion 1.32.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: array
|
||||||
name:
|
name:
|
||||||
description: |
|
description: |
|
||||||
The name of the driver.
|
The name of the driver.
|
||||||
@ -692,6 +733,13 @@ network_interface:
|
|||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
next:
|
||||||
|
description: |
|
||||||
|
A URL to request a next collection of the resource. This parameter is
|
||||||
|
returned when ``limit`` is specified in a request and there remain items.
|
||||||
|
in: body
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
node_name:
|
node_name:
|
||||||
description: |
|
description: |
|
||||||
Human-readable identifier for the Node resource. May be undefined. Certain
|
Human-readable identifier for the Node resource. May be undefined. Certain
|
||||||
@ -1046,3 +1094,75 @@ versions:
|
|||||||
in: body
|
in: body
|
||||||
required: true
|
required: true
|
||||||
type: array
|
type: array
|
||||||
|
|
||||||
|
# variables returned from volume-connector
|
||||||
|
volume_connector_connector_id:
|
||||||
|
description: |
|
||||||
|
The identifier of Volume connector. The identifier format depends on the
|
||||||
|
``type`` of the Volume connector, eg
|
||||||
|
"iqn.2017-05.org.openstack:01:d9a51732c3f" if the ``type`` is "iqn",
|
||||||
|
"192.168.1.2" if the ``type`` is "ip".
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
volume_connector_type:
|
||||||
|
description: |
|
||||||
|
The type of Volume connector such as "iqn", "ip", "wwnn" and "wwpn".
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
volume_connectors:
|
||||||
|
description: |
|
||||||
|
A collection of Volume connector resources.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: array
|
||||||
|
volume_connectors_link:
|
||||||
|
description: |
|
||||||
|
Links to a collection of Volume connector resources.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: array
|
||||||
|
|
||||||
|
# variables returned from volume-target
|
||||||
|
volume_target_boot_index:
|
||||||
|
description: |
|
||||||
|
The boot index of the Volume target. "0" indicates that this volume is
|
||||||
|
used as a boot volume.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
volume_target_properties:
|
||||||
|
description: |
|
||||||
|
A set of physical information of the volume such as the identifier
|
||||||
|
(eg. IQN) and LUN number of the volume. This information is used to connect
|
||||||
|
the node to the volume by the storage interface. The contents depend on the
|
||||||
|
volume type.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: object
|
||||||
|
volume_target_volume_id:
|
||||||
|
description: |
|
||||||
|
The identifier of the volume. This ID is used by storage interface to
|
||||||
|
distinguish volumes.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
volume_target_volume_type:
|
||||||
|
description: |
|
||||||
|
The type of Volume target such as 'iscsi' and 'fibre_channel'.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
volume_targets:
|
||||||
|
description: |
|
||||||
|
A collection of Volume target resources.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: array
|
||||||
|
volume_targets_link:
|
||||||
|
description: |
|
||||||
|
Links to a collection of Volume target resources.
|
||||||
|
in: body
|
||||||
|
required: true
|
||||||
|
type: array
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
],
|
],
|
||||||
"min_version": "1.1",
|
"min_version": "1.1",
|
||||||
"status": "CURRENT",
|
"status": "CURRENT",
|
||||||
"version": "1.31"
|
"version": "1.32"
|
||||||
},
|
},
|
||||||
"description": "Ironic is an OpenStack project which aims to provision baremetal machines.",
|
"description": "Ironic is an OpenStack project which aims to provision baremetal machines.",
|
||||||
"name": "OpenStack Ironic API",
|
"name": "OpenStack Ironic API",
|
||||||
@ -24,7 +24,7 @@
|
|||||||
],
|
],
|
||||||
"min_version": "1.1",
|
"min_version": "1.1",
|
||||||
"status": "CURRENT",
|
"status": "CURRENT",
|
||||||
"version": "1.31"
|
"version": "1.32"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -86,5 +86,15 @@
|
|||||||
"href": "http://127.0.0.1:6385/ports/",
|
"href": "http://127.0.0.1:6385/ports/",
|
||||||
"rel": "bookmark"
|
"rel": "bookmark"
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"volume": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/volume/",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/volume/",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -78,5 +78,15 @@
|
|||||||
"target_raid_config": {},
|
"target_raid_config": {},
|
||||||
"updated_at": null,
|
"updated_at": null,
|
||||||
"uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
|
"uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
|
||||||
"vendor_interface": null
|
"vendor_interface": null,
|
||||||
|
"volume": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
@ -80,5 +80,15 @@
|
|||||||
"target_raid_config": {},
|
"target_raid_config": {},
|
||||||
"updated_at": "2016-08-18T22:28:49.653974+00:00",
|
"updated_at": "2016-08-18T22:28:49.653974+00:00",
|
||||||
"uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
|
"uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
|
||||||
"vendor_interface": null
|
"vendor_interface": null,
|
||||||
|
"volume": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
@ -82,5 +82,15 @@
|
|||||||
"target_raid_config": {},
|
"target_raid_config": {},
|
||||||
"updated_at": "2016-08-18T22:28:49.653974+00:00",
|
"updated_at": "2016-08-18T22:28:49.653974+00:00",
|
||||||
"uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
|
"uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
|
||||||
"vendor_interface": null
|
"vendor_interface": null,
|
||||||
|
"volume": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"connectors": [
|
||||||
|
{
|
||||||
|
"connector_id": "iqn.2017-07.org.openstack:02:10190a4153e",
|
||||||
|
"created_at": "2016-08-18T22:28:48.643434+11:11",
|
||||||
|
"extra": {},
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
|
||||||
|
"type": "iqn",
|
||||||
|
"updated_at": "2016-08-18T22:28:49.653974+00:00",
|
||||||
|
"uuid": "9bf93e01-d728-47a3-ad4b-5e66a835037c"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"connectors": [
|
||||||
|
{
|
||||||
|
"connector_id": "iqn.2017-07.org.openstack:02:10190a4153e",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
|
||||||
|
"type": "iqn",
|
||||||
|
"uuid": "9bf93e01-d728-47a3-ad4b-5e66a835037c"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
32
api-ref/source/samples/node-volume-list-response.json
Normal file
32
api-ref/source/samples/node-volume-list-response.json
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"connectors": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume/connectors",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume/connectors",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume/",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume/",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume/targets",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume/targets",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"boot_index": 0,
|
||||||
|
"created_at": "2016-08-18T22:28:48.643434+11:11",
|
||||||
|
"extra": {},
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
|
||||||
|
"properties": {},
|
||||||
|
"updated_at": "2016-08-18T22:28:49.653974+00:00",
|
||||||
|
"uuid": "bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
|
||||||
|
"volume_id": "7211f7d3-3f32-4efc-b64e-9b8e92e64a8e",
|
||||||
|
"volume_type": "iscsi"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
21
api-ref/source/samples/node-volume-target-list-response.json
Normal file
21
api-ref/source/samples/node-volume-target-list-response.json
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"boot_index": 0,
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
|
||||||
|
"uuid": "bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
|
||||||
|
"volume_id": "7211f7d3-3f32-4efc-b64e-9b8e92e64a8e",
|
||||||
|
"volume_type": "iscsi"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -82,7 +82,17 @@
|
|||||||
"target_raid_config": {},
|
"target_raid_config": {},
|
||||||
"updated_at": "2016-08-18T22:28:49.653974+00:00",
|
"updated_at": "2016-08-18T22:28:49.653974+00:00",
|
||||||
"uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
|
"uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
|
||||||
"vendor_interface": null
|
"vendor_interface": null,
|
||||||
|
"volume": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"boot_interface": "pxe",
|
"boot_interface": "pxe",
|
||||||
@ -164,7 +174,17 @@
|
|||||||
"target_raid_config": {},
|
"target_raid_config": {},
|
||||||
"updated_at": null,
|
"updated_at": null,
|
||||||
"uuid": "2b045129-a906-46af-bc1a-092b294b3428",
|
"uuid": "2b045129-a906-46af-bc1a-092b294b3428",
|
||||||
"vendor_interface": "no-vendor"
|
"vendor_interface": "no-vendor",
|
||||||
|
"volume": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/nodes/2b045129-a906-46af-bc1a-092b294b3428/volume",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/nodes/2b045129-a906-46af-bc1a-092b294b3428/volume",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
|
||||||
|
"type": "iqn",
|
||||||
|
"connector_id": "iqn.2017-07.org.openstack:01:d9a51732c3f"
|
||||||
|
}
|
||||||
|
|
19
api-ref/source/samples/volume-connector-create-response.json
Normal file
19
api-ref/source/samples/volume-connector-create-response.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"connector_id": "iqn.2017-07.org.openstack:01:d9a51732c3f",
|
||||||
|
"created_at": "2016-08-18T22:28:48.643434+11:11",
|
||||||
|
"extra": {},
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
|
||||||
|
"type": "iqn",
|
||||||
|
"updated_at": null,
|
||||||
|
"uuid": "9bf93e01-d728-47a3-ad4b-5e66a835037c"
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"connectors": [
|
||||||
|
{
|
||||||
|
"connector_id": "iqn.2017-07.org.openstack:01:d9a51732c3f",
|
||||||
|
"created_at": "2016-08-18T22:28:48.643434+11:11",
|
||||||
|
"extra": {},
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
|
||||||
|
"type": "iqn",
|
||||||
|
"updated_at": null,
|
||||||
|
"uuid": "9bf93e01-d728-47a3-ad4b-5e66a835037c"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
20
api-ref/source/samples/volume-connector-list-response.json
Normal file
20
api-ref/source/samples/volume-connector-list-response.json
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"connectors": [
|
||||||
|
{
|
||||||
|
"connector_id": "iqn.2017-07.org.openstack:01:d9a51732c3f",
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
|
||||||
|
"type": "iqn",
|
||||||
|
"uuid": "9bf93e01-d728-47a3-ad4b-5e66a835037c"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -0,0 +1,7 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"path" : "/connector_id",
|
||||||
|
"value" : "iqn.2017-07.org.openstack:02:10190a4153e",
|
||||||
|
"op" : "replace"
|
||||||
|
}
|
||||||
|
]
|
19
api-ref/source/samples/volume-connector-update-response.json
Normal file
19
api-ref/source/samples/volume-connector-update-response.json
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"connector_id": "iqn.2017-07.org.openstack:02:10190a4153e",
|
||||||
|
"created_at": "2016-08-18T22:28:48.643434+11:11",
|
||||||
|
"extra": {},
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
|
||||||
|
"type": "iqn",
|
||||||
|
"updated_at": "2016-08-18T22:28:49.653974+00:00",
|
||||||
|
"uuid": "9bf93e01-d728-47a3-ad4b-5e66a835037c"
|
||||||
|
}
|
32
api-ref/source/samples/volume-list-response.json
Normal file
32
api-ref/source/samples/volume-list-response.json
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"connectors": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/volume/connectors",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/volume/connectors",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/volume/",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/volume/",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/volume/targets",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/volume/targets",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
7
api-ref/source/samples/volume-target-create-request.json
Normal file
7
api-ref/source/samples/volume-target-create-request.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
|
||||||
|
"volume_type": "iscsi",
|
||||||
|
"boot_index": 0,
|
||||||
|
"volume_id": "04452bed-5367-4202-8bf5-de4335ac56d2"
|
||||||
|
}
|
||||||
|
|
21
api-ref/source/samples/volume-target-create-response.json
Normal file
21
api-ref/source/samples/volume-target-create-response.json
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"boot_index": 0,
|
||||||
|
"created_at": "2016-08-18T22:28:48.643434+11:11",
|
||||||
|
"extra": {},
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
|
||||||
|
"properties": {},
|
||||||
|
"updated_at": null,
|
||||||
|
"uuid": "bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
|
||||||
|
"volume_id": "04452bed-5367-4202-8bf5-de4335ac56d2",
|
||||||
|
"volume_type": "iscsi"
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"boot_index": 0,
|
||||||
|
"created_at": "2016-08-18T22:28:48.643434+11:11",
|
||||||
|
"extra": {},
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
|
||||||
|
"properties": {},
|
||||||
|
"updated_at": null,
|
||||||
|
"uuid": "bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
|
||||||
|
"volume_id": "04452bed-5367-4202-8bf5-de4335ac56d2",
|
||||||
|
"volume_type": "iscsi"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
21
api-ref/source/samples/volume-target-list-response.json
Normal file
21
api-ref/source/samples/volume-target-list-response.json
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"boot_index": 0,
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
|
||||||
|
"uuid": "bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
|
||||||
|
"volume_id": "04452bed-5367-4202-8bf5-de4335ac56d2",
|
||||||
|
"volume_type": "iscsi"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
7
api-ref/source/samples/volume-target-update-request.json
Normal file
7
api-ref/source/samples/volume-target-update-request.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"path" : "/volume_id",
|
||||||
|
"value" : "7211f7d3-3f32-4efc-b64e-9b8e92e64a8e",
|
||||||
|
"op" : "replace"
|
||||||
|
}
|
||||||
|
]
|
21
api-ref/source/samples/volume-target-update-response.json
Normal file
21
api-ref/source/samples/volume-target-update-response.json
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"boot_index": 0,
|
||||||
|
"created_at": "2016-08-18T22:28:48.643434+11:11",
|
||||||
|
"extra": {},
|
||||||
|
"links": [
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/v1/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
|
||||||
|
"rel": "self"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"href": "http://127.0.0.1:6385/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
|
||||||
|
"rel": "bookmark"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
|
||||||
|
"properties": {},
|
||||||
|
"updated_at": "2016-08-18T22:28:49.653974+00:00",
|
||||||
|
"uuid": "bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
|
||||||
|
"volume_id": "7211f7d3-3f32-4efc-b64e-9b8e92e64a8e",
|
||||||
|
"volume_type": "iscsi"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user