Browse Source

Add API for volume resources to api-ref

This patch adds API for volume resources to api-ref.

Partial-Bug: 1526231
Change-Id: I986860cffd344f5cea9f8f5a2f845f77bf6e9e54
tags/9.0.0
Hironori Shiina 2 years ago
parent
commit
7317c17e4e
30 changed files with 1187 additions and 9 deletions
  1. 43
    0
      api-ref/regenerate-samples.sh
  2. 140
    0
      api-ref/source/baremetal-api-v1-nodes-volume.inc
  3. 5
    1
      api-ref/source/baremetal-api-v1-nodes.inc
  4. 460
    0
      api-ref/source/baremetal-api-v1-volume.inc
  5. 2
    0
      api-ref/source/index.rst
  6. 121
    1
      api-ref/source/parameters.yaml
  7. 2
    2
      api-ref/source/samples/api-root-response.json
  8. 10
    0
      api-ref/source/samples/api-v1-root-response.json
  9. 11
    1
      api-ref/source/samples/node-create-response.json
  10. 11
    1
      api-ref/source/samples/node-show-response.json
  11. 11
    1
      api-ref/source/samples/node-update-driver-info-response.json
  12. 23
    0
      api-ref/source/samples/node-volume-connector-detail-response.json
  13. 20
    0
      api-ref/source/samples/node-volume-connector-list-response.json
  14. 32
    0
      api-ref/source/samples/node-volume-list-response.json
  15. 25
    0
      api-ref/source/samples/node-volume-target-detail-response.json
  16. 21
    0
      api-ref/source/samples/node-volume-target-list-response.json
  17. 22
    2
      api-ref/source/samples/nodes-list-details-response.json
  18. 6
    0
      api-ref/source/samples/volume-connector-create-request.json
  19. 19
    0
      api-ref/source/samples/volume-connector-create-response.json
  20. 23
    0
      api-ref/source/samples/volume-connector-list-detail-response.json
  21. 20
    0
      api-ref/source/samples/volume-connector-list-response.json
  22. 7
    0
      api-ref/source/samples/volume-connector-update-request.json
  23. 19
    0
      api-ref/source/samples/volume-connector-update-response.json
  24. 32
    0
      api-ref/source/samples/volume-list-response.json
  25. 7
    0
      api-ref/source/samples/volume-target-create-request.json
  26. 21
    0
      api-ref/source/samples/volume-target-create-response.json
  27. 25
    0
      api-ref/source/samples/volume-target-list-detail-response.json
  28. 21
    0
      api-ref/source/samples/volume-target-list-response.json
  29. 7
    0
      api-ref/source/samples/volume-target-update-request.json
  30. 21
    0
      api-ref/source/samples/volume-target-update-response.json

+ 43
- 0
api-ref/regenerate-samples.sh View File

@@ -20,6 +20,8 @@ DOC_NODE_UUID="6d85703a-565d-469a-96ce-30b6de53079d"
20 20
 DOC_DYNAMIC_NODE_UUID="2b045129-a906-46af-bc1a-092b294b3428"
21 21
 DOC_PORT_UUID="d2b30520-907d-46c8-bfee-c5586e6fb3a1"
22 22
 DOC_PORTGROUP_UUID="e43c722c-248e-4c6e-8ce8-0d8ff129387a"
23
+DOC_VOL_CONNECTOR_UUID="9bf93e01-d728-47a3-ad4b-5e66a835037c"
24
+DOC_VOL_TARGET_UUID="bd4d008c-7d31-463d-abf9-6c23d9d55f7f"
23 25
 DOC_PROVISION_UPDATED_AT="2016-08-18T22:28:49.946416+00:00"
24 26
 DOC_CREATED_AT="2016-08-18T22:28:48.643434+11:11"
25 27
 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
256 258
 GET v1/nodes/$NID/vifs > node-vif-list-response.json
257 259
 
258 260
 
261
+#############
262
+# VOLUME APIs
263
+GET v1/volume/ > volume-list-response.json
264
+
265
+sed -i "s/.*node_uuid.*/    \"node_uuid\": \"$NID\",/" volume-connector-create-request.json
266
+POST v1/volume/connectors volume-connector-create-request.json > volume-connector-create-response.json
267
+VCID=$(cat volume-connector-create-response.json | grep '"uuid"' | sed 's/.*"\([0-9a-f\-]*\)",*/\1/')
268
+if [ "$VCID" == "" ]; then
269
+    exit 1
270
+else
271
+    echo "Volume connector created. UUID: $VCID"
272
+fi
273
+
274
+GET v1/volume/connectors > volume-connector-list-response.json
275
+GET v1/volume/connectors?detail=True > volume-connector-list-detail-response.json
276
+PATCH v1/volume/connectors/$VCID volume-connector-update-request.json > volume-connector-update-response.json
277
+
278
+sed -i "s/.*node_uuid.*/    \"node_uuid\": \"$NID\",/" volume-target-create-request.json
279
+POST v1/volume/targets volume-target-create-request.json > volume-target-create-response.json
280
+VTID=$(cat volume-target-create-response.json | grep '"uuid"' | sed 's/.*"\([0-9a-f\-]*\)",*/\1/')
281
+if [ "$VTID" == "" ]; then
282
+    exit 1
283
+else
284
+    echo "Volume target created. UUID: $VCID"
285
+fi
286
+
287
+GET v1/volume/targets > volume-target-list-response.json
288
+GET v1/volume/targets?detail=True > volume-target-list-detail-response.json
289
+PATCH v1/volume/targets/$VTID volume-target-update-request.json > volume-target-update-response.json
290
+
291
+##################
292
+# NODE VOLUME APIs
293
+GET v1/nodes/$NID/volume > node-volume-list-response.json
294
+GET v1/nodes/$NID/volume/connectors > node-volume-connector-list-response.json
295
+GET v1/nodes/$NID/volume/connectors?detail=True > node-volume-connector-detail-response.json
296
+GET v1/nodes/$NID/volume/targets > node-volume-target-list-response.json
297
+GET v1/nodes/$NID/volume/targets?detail=True > node-volume-target-detail-response.json
298
+
299
+
259 300
 #####################
260 301
 # Replace automatically generated UUIDs by already used in documentation
261 302
 sed -i "s/$CID/$DOC_CHASSIS_UUID/" *.json
@@ -263,6 +304,8 @@ sed -i "s/$NID/$DOC_NODE_UUID/" *.json
263 304
 sed -i "s/$DNID/$DOC_DYNAMIC_NODE_UUID/" *.json
264 305
 sed -i "s/$PID/$DOC_PORT_UUID/" *.json
265 306
 sed -i "s/$PGID/$DOC_PORTGROUP_UUID/" *.json
307
+sed -i "s/$VCID/$DOC_VOL_CONNECTOR_UUID/" *.json
308
+sed -i "s/$VTID/$DOC_VOL_TARGET_UUID/" *.json
266 309
 sed -i "s/$(hostname)/$DOC_IRONIC_CONDUCTOR_HOSTNAME/" *.json
267 310
 sed -i "s/created_at\": \".*\"/created_at\": \"$DOC_CREATED_AT\"/" *.json
268 311
 sed -i "s/updated_at\": \".*\"/updated_at\": \"$DOC_UPDATED_AT\"/" *.json

+ 140
- 0
api-ref/source/baremetal-api-v1-nodes-volume.inc View File

@@ -0,0 +1,140 @@
1
+.. -*- rst -*-
2
+
3
+================================================
4
+Listing Volume resources by Node (nodes, volume)
5
+================================================
6
+
7
+Given a Node identifier (``uuid`` or ``name``), the API exposes the list of,
8
+and details of, all Volume resources associated with that Node.
9
+
10
+These endpoints do not allow modification of the Volume connectors and Volume
11
+targets; that should be done by accessing the Volume resources under the
12
+``/v1/volume/connectors`` and ``/v1/volume/targets`` endpoint.
13
+
14
+Volume resource was added in API microversion 1.32. If using an older
15
+version, all the requests return ``Not Found (404)`` error code.
16
+
17
+
18
+List Links of Volume Resources by Node
19
+======================================
20
+
21
+.. rest_method:: GET /v1/nodes/{node_ident}/volume
22
+
23
+Return a list of links to all volume resources associated with ``node_ident``.
24
+
25
+Normal response code: 200
26
+
27
+Request
28
+-------
29
+
30
+.. rest_parameters:: parameters.yaml
31
+
32
+    - node_ident: node_ident
33
+
34
+Response
35
+--------
36
+
37
+.. rest_parameters:: parameters.yaml
38
+
39
+    - connectors: volume_connectors_link
40
+    - targets: volume_targets_link
41
+    - links: links
42
+
43
+**Example Volume list response:**
44
+
45
+.. literalinclude:: samples/node-volume-list-response.json
46
+   :language: javascript
47
+
48
+
49
+List Volume connectors by Node
50
+==============================
51
+
52
+.. rest_method:: GET /v1/nodes/{node_ident}/volume/connectors
53
+
54
+Return a list of bare metal Volume connectors associated with ``node_ident``.
55
+
56
+Normal response code: 200
57
+
58
+Error codes: 400,401,403,404
59
+
60
+Request
61
+-------
62
+
63
+.. rest_parameters:: parameters.yaml
64
+
65
+    - node_ident: node_ident
66
+    - fields: fields
67
+    - limit: limit
68
+    - marker: marker
69
+    - sort_dir: sort_dir
70
+    - sort_key: sort_key
71
+
72
+Response
73
+--------
74
+
75
+.. rest_parameters:: parameters.yaml
76
+
77
+    - connectors: volume_connectors
78
+    - uuid: uuid
79
+    - type: volume_connector_type
80
+    - connector_id: volume_connector_connector_id
81
+    - node_uuid: node_uuid
82
+    - extra: extra
83
+    - links: links
84
+    - next: next
85
+
86
+**Example list of Node's Volume connectors:**
87
+
88
+.. literalinclude:: samples/node-volume-connector-list-response.json
89
+
90
+**Example detailed list of Node's Volume connectors:**
91
+
92
+.. literalinclude:: samples/node-volume-connector-detail-response.json
93
+
94
+
95
+List Volume targets by Node
96
+===========================
97
+
98
+.. rest_method:: GET /v1/nodes/{node_ident}/volume/targets
99
+
100
+Return a list of bare metal Volume targets associated with ``node_ident``.
101
+
102
+Normal response code: 200
103
+
104
+Error codes: 400,401,403,404
105
+
106
+Request
107
+-------
108
+
109
+.. rest_parameters:: parameters.yaml
110
+
111
+    - node_ident: node_ident
112
+    - fields: fields
113
+    - limit: limit
114
+    - marker: marker
115
+    - sort_dir: sort_dir
116
+    - sort_key: sort_key
117
+
118
+Response
119
+--------
120
+
121
+.. rest_parameters:: parameters.yaml
122
+
123
+    - targets: volume_targets
124
+    - uuid: uuid
125
+    - volume_type: volume_target_volume_type
126
+    - properties: volume_target_properties
127
+    - boot_index: volume_target_boot_index
128
+    - volume_id: volume_target_volume_id
129
+    - extra: extra
130
+    - node_uuid: node_uuid
131
+    - links: links
132
+    - next: next
133
+
134
+**Example list of Node's Volume targets:**
135
+
136
+.. literalinclude:: samples/node-volume-target-list-response.json
137
+
138
+**Example detailed list of Node's Volume targets:**
139
+
140
+.. literalinclude:: samples/node-volume-target-detail-response.json

+ 5
- 1
api-ref/source/baremetal-api-v1-nodes.inc View File

@@ -102,7 +102,7 @@ network_interface field, which was introduced in API microversion 1.20. If this
102 102
 field is not supplied when creating the Node, the default value will be used.
103 103
 
104 104
 The list and example below are representative of the response as of API
105
-microversion 1.31.
105
+microversion 1.32.
106 106
 
107 107
 .. rest_parameters:: parameters.yaml
108 108
 
@@ -142,6 +142,7 @@ microversion 1.31.
142 142
     - power_interface: power_interface
143 143
     - raid_interface: raid_interface
144 144
     - vendor_interface: vendor_interface
145
+    - volume: n_volume
145 146
 
146 147
 **Example JSON representation of a Node:**
147 148
 
@@ -285,6 +286,7 @@ Response
285 286
     - power_interface: power_interface
286 287
     - raid_interface: raid_interface
287 288
     - vendor_interface: vendor_interface
289
+    - volume: n_volume
288 290
 
289 291
 **Example detailed list of Nodes:**
290 292
 
@@ -354,6 +356,7 @@ Response
354 356
     - power_interface: power_interface
355 357
     - raid_interface: raid_interface
356 358
     - vendor_interface: vendor_interface
359
+    - volume: n_volume
357 360
 
358 361
 **Example JSON representation of a Node:**
359 362
 
@@ -432,6 +435,7 @@ Response
432 435
     - power_interface: power_interface
433 436
     - raid_interface: raid_interface
434 437
     - vendor_interface: vendor_interface
438
+    - volume: n_volume
435 439
 
436 440
 **Example JSON representation of a Node:**
437 441
 

+ 460
- 0
api-ref/source/baremetal-api-v1-volume.inc View File

@@ -0,0 +1,460 @@
1
+.. -*- rst -*-
2
+
3
+===============
4
+Volume (volume)
5
+===============
6
+
7
+Since API version 1.32, information for connecting remote volumes to a node
8
+can be associated with a Node. There are two types of resources, Volume
9
+connectors and Volume targets. Volume connectors contain initiator information
10
+of Nodes. Volume targets contain target information of remote volumes.
11
+
12
+Listing, Searching, Creating, Updating, and Deleting of Volume connector
13
+resources are done through the ``v1/volume/connectors`` resource. The same
14
+operations for Volume targets are done through the ``v1/volume/targets``
15
+resources.
16
+
17
+List Links of Volume Resources
18
+==============================
19
+
20
+.. rest_method:: GET /v1/volume
21
+
22
+Return a list of links to all volume resources.
23
+
24
+Normal response code: 200
25
+
26
+Request
27
+-------
28
+
29
+Response
30
+--------
31
+
32
+.. rest_parameters:: parameters.yaml
33
+
34
+    - connectors: volume_connectors_link
35
+    - targets: volume_targets_link
36
+    - links: links
37
+
38
+**Example Volume list response:**
39
+
40
+.. literalinclude:: samples/volume-list-response.json
41
+   :language: javascript
42
+
43
+
44
+List Volume Connectors
45
+======================
46
+
47
+.. rest_method:: GET /v1/volume/connectors
48
+
49
+Return a list of Volume connectors for all nodes.
50
+
51
+By default, this query will return the UUID, node UUID, type, and connector ID
52
+for each Volume connector.
53
+
54
+
55
+Normal response code: 200
56
+
57
+Error codes: 400,401,403,404
58
+
59
+Request
60
+-------
61
+
62
+.. rest_parameters:: parameters.yaml
63
+
64
+    - node: r_volume_connector_node_ident
65
+    - fields: fields
66
+    - detail: detail
67
+    - limit: limit
68
+    - marker: marker
69
+    - sort_dir: sort_dir
70
+    - sort_key: sort_key
71
+
72
+Response
73
+--------
74
+
75
+.. rest_parameters:: parameters.yaml
76
+
77
+    - connectors: volume_connectors
78
+    - uuid: uuid
79
+    - type: volume_connector_type
80
+    - connector_id: volume_connector_connector_id
81
+    - node_uuid: node_uuid
82
+    - extra: extra
83
+    - links: links
84
+    - next: next
85
+
86
+**Example Volume connector list response:**
87
+
88
+.. literalinclude:: samples/volume-connector-list-response.json
89
+   :language: javascript
90
+
91
+**Example detailed Volume connector list response:**
92
+
93
+.. literalinclude:: samples/volume-connector-list-detail-response.json
94
+   :language: javascript
95
+
96
+
97
+Create Volume Connector
98
+=======================
99
+
100
+.. rest_method:: POST /v1/volume/connectors
101
+
102
+Creates a new Volume connector resource.
103
+
104
+This method requires a Node UUID, a connector type and a connector ID.
105
+
106
+Normal response code: 201
107
+
108
+Error codes: 400,401,403,404,409
109
+
110
+Request
111
+-------
112
+
113
+.. rest_parameters:: parameters.yaml
114
+
115
+    - node_uuid: node_uuid
116
+    - type: volume_connector_type
117
+    - connector_id: volume_connector_connector_id
118
+    - extra: extra
119
+
120
+**Example Volume connector creation request:**
121
+
122
+.. literalinclude:: samples/volume-connector-create-request.json
123
+   :language: javascript
124
+
125
+Response
126
+--------
127
+
128
+.. rest_parameters:: parameters.yaml
129
+
130
+    - uuid: uuid
131
+    - type: volume_connector_type
132
+    - connector_id: volume_connector_connector_id
133
+    - node_uuid: node_uuid
134
+    - extra: extra
135
+    - links: links
136
+
137
+**Example Volume connector creation response:**
138
+
139
+.. literalinclude:: samples/volume-connector-create-response.json
140
+   :language: javascript
141
+
142
+
143
+Show Volume Connector Details
144
+=============================
145
+
146
+.. rest_method:: GET /v1/volume/connectors/{volume_connector_id}
147
+
148
+Show details for the given Volume connector.
149
+
150
+Normal response code: 200
151
+
152
+Error codes: 400,401,403,404
153
+
154
+Request
155
+-------
156
+
157
+.. rest_parameters:: parameters.yaml
158
+
159
+    - volume_connector_id: volume_connector_id
160
+    - fields: fields
161
+
162
+Response
163
+--------
164
+
165
+.. rest_parameters:: parameters.yaml
166
+
167
+    - uuid: uuid
168
+    - type: volume_connector_type
169
+    - connector_id: volume_connector_connector_id
170
+    - node_uuid: node_uuid
171
+    - extra: extra
172
+    - links: links
173
+
174
+**Example Volume connector details:**
175
+
176
+.. literalinclude:: samples/volume-connector-create-response.json
177
+   :language: javascript
178
+
179
+
180
+Update a Volume Connector
181
+=========================
182
+
183
+.. rest_method:: PATCH /v1/volume/connectors/{volume_connector_id}
184
+
185
+Update a Volume connector.
186
+
187
+A Volume connector can be updated only while a node associated with the Volume
188
+connector is powered off.
189
+
190
+Normal response code: 200
191
+
192
+Error codes: 400,401,403,404,409
193
+
194
+Request
195
+-------
196
+
197
+The BODY of the PATCH request must be a JSON PATCH document, adhering to
198
+`RFC 6902 <https://tools.ietf.org/html/rfc6902>`_.
199
+
200
+.. rest_parameters:: parameters.yaml
201
+
202
+    - volume_connector_id: volume_connector_id
203
+
204
+**Example Volume connector update request:**
205
+
206
+.. literalinclude:: samples/volume-connector-update-request.json
207
+   :language: javascript
208
+
209
+Response
210
+--------
211
+
212
+.. rest_parameters:: parameters.yaml
213
+
214
+    - uuid: uuid
215
+    - type: volume_connector_type
216
+    - connector_id: volume_connector_connector_id
217
+    - node_uuid: node_uuid
218
+    - extra: extra
219
+    - links: links
220
+
221
+**Example Volume connector update response:**
222
+
223
+.. literalinclude:: samples/volume-connector-update-response.json
224
+   :language: javascript
225
+
226
+
227
+Delete Volume Connector
228
+=======================
229
+
230
+.. rest_method:: DELETE /v1/volume/connector/{volume_connector_id}
231
+
232
+Delete a Volume connector.
233
+
234
+A Volume connector can be deleted only while a node associated with the Volume
235
+connector is powered off.
236
+
237
+Normal response code: 204
238
+
239
+Error codes: 400,401,403,404,409
240
+
241
+Request
242
+-------
243
+
244
+.. rest_parameters:: parameters.yaml
245
+
246
+    - volume_connector_id: volume_connector_id
247
+
248
+List Volume Targets
249
+===================
250
+
251
+.. rest_method:: GET /v1/volume/targets
252
+
253
+Return a list of Volume targets for all nodes.
254
+
255
+By default, this query will return the UUID, node UUID, volume type, boot
256
+index, and volume ID for each Volume target.
257
+
258
+
259
+Normal response code: 200
260
+
261
+Error codes: 400,401,403,404
262
+
263
+Request
264
+-------
265
+
266
+.. rest_parameters:: parameters.yaml
267
+
268
+    - node: r_volume_target_node_ident
269
+    - fields: fields
270
+    - detail: detail
271
+    - limit: limit
272
+    - marker: marker
273
+    - sort_dir: sort_dir
274
+    - sort_key: sort_key
275
+
276
+Response
277
+--------
278
+
279
+.. rest_parameters:: parameters.yaml
280
+
281
+    - targets: volume_targets
282
+    - uuid: uuid
283
+    - volume_type: volume_target_volume_type
284
+    - properties: volume_target_properties
285
+    - boot_index: volume_target_boot_index
286
+    - volume_id: volume_target_volume_id
287
+    - extra: extra
288
+    - node_uuid: node_uuid
289
+    - links: links
290
+    - next: next
291
+
292
+**Example Volume target list response:**
293
+
294
+.. literalinclude:: samples/volume-target-list-response.json
295
+   :language: javascript
296
+
297
+**Example detailed Volume target list response:**
298
+
299
+.. literalinclude:: samples/volume-target-list-detail-response.json
300
+   :language: javascript
301
+
302
+
303
+Create Volume Target
304
+====================
305
+
306
+.. rest_method:: POST /v1/volume/targets
307
+
308
+Creates a new Volume target resource.
309
+
310
+This method requires a Node UUID, volume type, volume ID, and boot index..
311
+
312
+Normal response code: 201
313
+
314
+Error codes: 400,401,403,404,409
315
+
316
+Request
317
+-------
318
+
319
+.. rest_parameters:: parameters.yaml
320
+
321
+    - node_uuid: node_uuid
322
+    - volume_type: volume_target_volume_type
323
+    - properties: volume_target_properties
324
+    - boot_index: volume_target_boot_index
325
+    - volume_id: volume_target_volume_id
326
+    - extra: extra
327
+
328
+**Example Volume target creation request:**
329
+
330
+.. literalinclude:: samples/volume-target-create-request.json
331
+   :language: javascript
332
+
333
+Response
334
+--------
335
+
336
+.. rest_parameters:: parameters.yaml
337
+
338
+    - uuid: uuid
339
+    - volume_type: volume_target_volume_type
340
+    - properties: volume_target_properties
341
+    - boot_index: volume_target_boot_index
342
+    - volume_id: volume_target_volume_id
343
+    - extra: extra
344
+    - node_uuid: node_uuid
345
+    - links: links
346
+
347
+**Example Volume target creation response:**
348
+
349
+.. literalinclude:: samples/volume-target-create-response.json
350
+   :language: javascript
351
+
352
+
353
+Show Volume Target Details
354
+==========================
355
+
356
+.. rest_method:: GET /v1/volume/targets/{volume_target_id}
357
+
358
+Show details for the given Volume target.
359
+
360
+Normal response code: 200
361
+
362
+Error codes: 400,401,403,404
363
+
364
+Request
365
+-------
366
+
367
+.. rest_parameters:: parameters.yaml
368
+
369
+    - volume_target_id: volume_target_id
370
+    - fields: fields
371
+
372
+Response
373
+--------
374
+
375
+.. rest_parameters:: parameters.yaml
376
+
377
+    - uuid: uuid
378
+    - volume_type: volume_target_volume_type
379
+    - properties: volume_target_properties
380
+    - boot_index: volume_target_boot_index
381
+    - volume_id: volume_target_volume_id
382
+    - extra: extra
383
+    - node_uuid: node_uuid
384
+    - links: links
385
+
386
+**Example Volume target details:**
387
+
388
+.. literalinclude:: samples/volume-target-create-response.json
389
+   :language: javascript
390
+
391
+
392
+Update a Volume Target
393
+======================
394
+
395
+.. rest_method:: PATCH /v1/volume/targets/{volume_target_id}
396
+
397
+Update a Volume target.
398
+
399
+A Volume target can be updated only while a node associated with the Volume
400
+target is powered off.
401
+
402
+Normal response code: 200
403
+
404
+Error codes: 400,401,403,404,409
405
+
406
+Request
407
+-------
408
+
409
+The BODY of the PATCH request must be a JSON PATCH document, adhering to
410
+`RFC 6902 <https://tools.ietf.org/html/rfc6902>`_.
411
+
412
+.. rest_parameters:: parameters.yaml
413
+
414
+    - volume_target_id: volume_target_id
415
+
416
+**Example Volume target update request:**
417
+
418
+.. literalinclude:: samples/volume-target-update-request.json
419
+   :language: javascript
420
+
421
+Response
422
+--------
423
+
424
+.. rest_parameters:: parameters.yaml
425
+
426
+    - uuid: uuid
427
+    - volume_type: volume_target_volume_type
428
+    - properties: volume_target_properties
429
+    - boot_index: volume_target_boot_index
430
+    - volume_id: volume_target_volume_id
431
+    - extra: extra
432
+    - node_uuid: node_uuid
433
+    - links: links
434
+
435
+**Example Volume target update response:**
436
+
437
+.. literalinclude:: samples/volume-target-update-response.json
438
+   :language: javascript
439
+
440
+
441
+Delete Volume Target
442
+====================
443
+
444
+.. rest_method:: DELETE /v1/volume/target/{volume_target_id}
445
+
446
+Delete a Volume target.
447
+
448
+A Volume target can be deleted only while a node associated with the Volume
449
+target is powered off.
450
+
451
+Normal response code: 204
452
+
453
+Error codes: 400,401,403,404,409
454
+
455
+Request
456
+-------
457
+
458
+.. rest_parameters:: parameters.yaml
459
+
460
+    - volume_target_id: volume_target_id

+ 2
- 0
api-ref/source/index.rst View File

@@ -16,6 +16,8 @@
16 16
 .. include:: baremetal-api-v1-ports.inc
17 17
 .. include:: baremetal-api-v1-nodes-ports.inc
18 18
 .. include:: baremetal-api-v1-portgroups-ports.inc
19
+.. include:: baremetal-api-v1-volume.inc
20
+.. include:: baremetal-api-v1-nodes-volume.inc
19 21
 .. include:: baremetal-api-v1-drivers.inc
20 22
 .. include:: baremetal-api-v1-driver-passthru.inc
21 23
 .. include:: baremetal-api-v1-chassis.inc

+ 121
- 1
api-ref/source/parameters.yaml View File

@@ -74,7 +74,18 @@ portgroup_ident:
74 74
   in: path
75 75
   required: true
76 76
   type: string
77
-
77
+volume_connector_id:
78
+  description: |
79
+    The UUID of the Volume connector.
80
+  in: path
81
+  required: true
82
+  type: string
83
+volume_target_id:
84
+  description: |
85
+    The UUID of the Volume target.
86
+  in: path
87
+  required: true
88
+  type: string
78 89
 
79 90
 callback_url:
80 91
   description: |
@@ -84,6 +95,14 @@ callback_url:
84 95
   required: true
85 96
   type: string
86 97
 
98
+detail:
99
+  description: |
100
+    Whether to show detailed information about the resource. This cannot be
101
+    set to True if ``fields`` parameter is specified.
102
+  in: query
103
+  required: false
104
+  type: boolean
105
+
87 106
 # variables in driver query string
88 107
 driver_detail:
89 108
   description: |
@@ -248,6 +267,22 @@ r_resource_class:
248 267
   in: query
249 268
   required: false
250 269
   type: string
270
+r_volume_connector_node_ident:
271
+  description: |
272
+    Filter the list of returned Volume connectors, and only return the ones
273
+    associated with this specific node (name or UUID), or an empty set if not
274
+    found. Added in API microversion 1.32.
275
+  in: query
276
+  required: false
277
+  type: string
278
+r_volume_target_node_ident:
279
+  description: |
280
+    Filter the list of returned Volume targets, and only return the ones
281
+    associated with this specific node (name or UUID), or an empty set if not
282
+    found. Added in API microversion 1.32.
283
+  in: query
284
+  required: false
285
+  type: string
251 286
 sort_dir:
252 287
   description: |
253 288
     Sorts the response by the requested sort
@@ -679,6 +714,12 @@ n_vifs:
679 714
   in: body
680 715
   required: true
681 716
   type: array
717
+n_volume:
718
+  description: |
719
+    Links to the volume resources. Added in API microversion 1.32.
720
+  in: body
721
+  required: true
722
+  type: array
682 723
 name:
683 724
   description: |
684 725
     The name of the driver.
@@ -692,6 +733,13 @@ network_interface:
692 733
   in: body
693 734
   required: true
694 735
   type: string
736
+next:
737
+  description: |
738
+    A URL to request a next collection of the resource. This parameter is
739
+    returned when ``limit`` is specified in a request and there remain items.
740
+  in: body
741
+  required: false
742
+  type: string
695 743
 node_name:
696 744
   description: |
697 745
     Human-readable identifier for the Node resource. May be undefined. Certain
@@ -1046,3 +1094,75 @@ versions:
1046 1094
   in: body
1047 1095
   required: true
1048 1096
   type: array
1097
+
1098
+# variables returned from volume-connector
1099
+volume_connector_connector_id:
1100
+  description: |
1101
+    The identifier of Volume connector. The identifier format depends on the
1102
+    ``type`` of the Volume connector, eg
1103
+    "iqn.2017-05.org.openstack:01:d9a51732c3f" if the ``type`` is "iqn",
1104
+    "192.168.1.2" if the ``type`` is "ip".
1105
+  in: body
1106
+  required: true
1107
+  type: string
1108
+volume_connector_type:
1109
+  description: |
1110
+    The type of Volume connector such as "iqn", "ip", "wwnn" and "wwpn".
1111
+  in: body
1112
+  required: true
1113
+  type: string
1114
+volume_connectors:
1115
+  description: |
1116
+    A collection of Volume connector resources.
1117
+  in: body
1118
+  required: true
1119
+  type: array
1120
+volume_connectors_link:
1121
+  description: |
1122
+    Links to a collection of Volume connector resources.
1123
+  in: body
1124
+  required: true
1125
+  type: array
1126
+
1127
+# variables returned from volume-target
1128
+volume_target_boot_index:
1129
+  description: |
1130
+    The boot index of the Volume target. "0" indicates that this volume is
1131
+    used as a boot volume.
1132
+  in: body
1133
+  required: true
1134
+  type: string
1135
+volume_target_properties:
1136
+  description: |
1137
+    A set of physical information of the volume such as the identifier
1138
+    (eg. IQN) and LUN number of the volume. This information is used to connect
1139
+    the node to the volume by the storage interface. The contents depend on the
1140
+    volume type.
1141
+  in: body
1142
+  required: true
1143
+  type: object
1144
+volume_target_volume_id:
1145
+  description: |
1146
+    The identifier of the volume. This ID is used by storage interface to
1147
+    distinguish volumes.
1148
+  in: body
1149
+  required: true
1150
+  type: string
1151
+volume_target_volume_type:
1152
+  description: |
1153
+    The type of Volume target such as 'iscsi' and 'fibre_channel'.
1154
+  in: body
1155
+  required: true
1156
+  type: string
1157
+volume_targets:
1158
+  description: |
1159
+    A collection of Volume target resources.
1160
+  in: body
1161
+  required: true
1162
+  type: array
1163
+volume_targets_link:
1164
+  description: |
1165
+    Links to a collection of Volume target resources.
1166
+  in: body
1167
+  required: true
1168
+  type: array

+ 2
- 2
api-ref/source/samples/api-root-response.json View File

@@ -9,7 +9,7 @@
9 9
     ],
10 10
     "min_version": "1.1",
11 11
     "status": "CURRENT",
12
-    "version": "1.31"
12
+    "version": "1.32"
13 13
   },
14 14
   "description": "Ironic is an OpenStack project which aims to provision baremetal machines.",
15 15
   "name": "OpenStack Ironic API",
@@ -24,7 +24,7 @@
24 24
       ],
25 25
       "min_version": "1.1",
26 26
       "status": "CURRENT",
27
-      "version": "1.31"
27
+      "version": "1.32"
28 28
     }
29 29
   ]
30 30
 }

+ 10
- 0
api-ref/source/samples/api-v1-root-response.json View File

@@ -86,5 +86,15 @@
86 86
       "href": "http://127.0.0.1:6385/ports/",
87 87
       "rel": "bookmark"
88 88
     }
89
+  ],
90
+  "volume": [
91
+    {
92
+      "href": "http://127.0.0.1:6385/v1/volume/",
93
+      "rel": "self"
94
+    },
95
+    {
96
+      "href": "http://127.0.0.1:6385/volume/",
97
+      "rel": "bookmark"
98
+    }
89 99
   ]
90 100
 }

+ 11
- 1
api-ref/source/samples/node-create-response.json View File

@@ -78,5 +78,15 @@
78 78
   "target_raid_config": {},
79 79
   "updated_at": null,
80 80
   "uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
81
-  "vendor_interface": null
81
+  "vendor_interface": null,
82
+  "volume": [
83
+    {
84
+      "href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume",
85
+      "rel": "self"
86
+    },
87
+    {
88
+      "href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume",
89
+      "rel": "bookmark"
90
+    }
91
+  ]
82 92
 }

+ 11
- 1
api-ref/source/samples/node-show-response.json View File

@@ -80,5 +80,15 @@
80 80
   "target_raid_config": {},
81 81
   "updated_at": "2016-08-18T22:28:49.653974+00:00",
82 82
   "uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
83
-  "vendor_interface": null
83
+  "vendor_interface": null,
84
+  "volume": [
85
+    {
86
+      "href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume",
87
+      "rel": "self"
88
+    },
89
+    {
90
+      "href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume",
91
+      "rel": "bookmark"
92
+    }
93
+  ]
84 94
 }

+ 11
- 1
api-ref/source/samples/node-update-driver-info-response.json View File

@@ -82,5 +82,15 @@
82 82
   "target_raid_config": {},
83 83
   "updated_at": "2016-08-18T22:28:49.653974+00:00",
84 84
   "uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
85
-  "vendor_interface": null
85
+  "vendor_interface": null,
86
+  "volume": [
87
+    {
88
+      "href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume",
89
+      "rel": "self"
90
+    },
91
+    {
92
+      "href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume",
93
+      "rel": "bookmark"
94
+    }
95
+  ]
86 96
 }

+ 23
- 0
api-ref/source/samples/node-volume-connector-detail-response.json View File

@@ -0,0 +1,23 @@
1
+{
2
+  "connectors": [
3
+    {
4
+      "connector_id": "iqn.2017-07.org.openstack:02:10190a4153e",
5
+      "created_at": "2016-08-18T22:28:48.643434+11:11",
6
+      "extra": {},
7
+      "links": [
8
+        {
9
+          "href": "http://127.0.0.1:6385/v1/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
10
+          "rel": "self"
11
+        },
12
+        {
13
+          "href": "http://127.0.0.1:6385/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
14
+          "rel": "bookmark"
15
+        }
16
+      ],
17
+      "node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
18
+      "type": "iqn",
19
+      "updated_at": "2016-08-18T22:28:49.653974+00:00",
20
+      "uuid": "9bf93e01-d728-47a3-ad4b-5e66a835037c"
21
+    }
22
+  ]
23
+}

+ 20
- 0
api-ref/source/samples/node-volume-connector-list-response.json View File

@@ -0,0 +1,20 @@
1
+{
2
+  "connectors": [
3
+    {
4
+      "connector_id": "iqn.2017-07.org.openstack:02:10190a4153e",
5
+      "links": [
6
+        {
7
+          "href": "http://127.0.0.1:6385/v1/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
8
+          "rel": "self"
9
+        },
10
+        {
11
+          "href": "http://127.0.0.1:6385/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
12
+          "rel": "bookmark"
13
+        }
14
+      ],
15
+      "node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
16
+      "type": "iqn",
17
+      "uuid": "9bf93e01-d728-47a3-ad4b-5e66a835037c"
18
+    }
19
+  ]
20
+}

+ 32
- 0
api-ref/source/samples/node-volume-list-response.json View File

@@ -0,0 +1,32 @@
1
+{
2
+  "connectors": [
3
+    {
4
+      "href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume/connectors",
5
+      "rel": "self"
6
+    },
7
+    {
8
+      "href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume/connectors",
9
+      "rel": "bookmark"
10
+    }
11
+  ],
12
+  "links": [
13
+    {
14
+      "href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume/",
15
+      "rel": "self"
16
+    },
17
+    {
18
+      "href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume/",
19
+      "rel": "bookmark"
20
+    }
21
+  ],
22
+  "targets": [
23
+    {
24
+      "href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume/targets",
25
+      "rel": "self"
26
+    },
27
+    {
28
+      "href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume/targets",
29
+      "rel": "bookmark"
30
+    }
31
+  ]
32
+}

+ 25
- 0
api-ref/source/samples/node-volume-target-detail-response.json View File

@@ -0,0 +1,25 @@
1
+{
2
+  "targets": [
3
+    {
4
+      "boot_index": 0,
5
+      "created_at": "2016-08-18T22:28:48.643434+11:11",
6
+      "extra": {},
7
+      "links": [
8
+        {
9
+          "href": "http://127.0.0.1:6385/v1/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
10
+          "rel": "self"
11
+        },
12
+        {
13
+          "href": "http://127.0.0.1:6385/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
14
+          "rel": "bookmark"
15
+        }
16
+      ],
17
+      "node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
18
+      "properties": {},
19
+      "updated_at": "2016-08-18T22:28:49.653974+00:00",
20
+      "uuid": "bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
21
+      "volume_id": "7211f7d3-3f32-4efc-b64e-9b8e92e64a8e",
22
+      "volume_type": "iscsi"
23
+    }
24
+  ]
25
+}

+ 21
- 0
api-ref/source/samples/node-volume-target-list-response.json View File

@@ -0,0 +1,21 @@
1
+{
2
+  "targets": [
3
+    {
4
+      "boot_index": 0,
5
+      "links": [
6
+        {
7
+          "href": "http://127.0.0.1:6385/v1/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
8
+          "rel": "self"
9
+        },
10
+        {
11
+          "href": "http://127.0.0.1:6385/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
12
+          "rel": "bookmark"
13
+        }
14
+      ],
15
+      "node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
16
+      "uuid": "bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
17
+      "volume_id": "7211f7d3-3f32-4efc-b64e-9b8e92e64a8e",
18
+      "volume_type": "iscsi"
19
+    }
20
+  ]
21
+}

+ 22
- 2
api-ref/source/samples/nodes-list-details-response.json View File

@@ -82,7 +82,17 @@
82 82
       "target_raid_config": {},
83 83
       "updated_at": "2016-08-18T22:28:49.653974+00:00",
84 84
       "uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
85
-      "vendor_interface": null
85
+      "vendor_interface": null,
86
+      "volume": [
87
+        {
88
+          "href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume",
89
+          "rel": "self"
90
+        },
91
+        {
92
+          "href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/volume",
93
+          "rel": "bookmark"
94
+        }
95
+      ]
86 96
     },
87 97
     {
88 98
       "boot_interface": "pxe",
@@ -164,7 +174,17 @@
164 174
       "target_raid_config": {},
165 175
       "updated_at": null,
166 176
       "uuid": "2b045129-a906-46af-bc1a-092b294b3428",
167
-      "vendor_interface": "no-vendor"
177
+      "vendor_interface": "no-vendor",
178
+      "volume": [
179
+        {
180
+          "href": "http://127.0.0.1:6385/v1/nodes/2b045129-a906-46af-bc1a-092b294b3428/volume",
181
+          "rel": "self"
182
+        },
183
+        {
184
+          "href": "http://127.0.0.1:6385/nodes/2b045129-a906-46af-bc1a-092b294b3428/volume",
185
+          "rel": "bookmark"
186
+        }
187
+      ]
168 188
     }
169 189
   ]
170 190
 }

+ 6
- 0
api-ref/source/samples/volume-connector-create-request.json View File

@@ -0,0 +1,6 @@
1
+{
2
+    "node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
3
+    "type": "iqn",
4
+    "connector_id": "iqn.2017-07.org.openstack:01:d9a51732c3f"
5
+}
6
+

+ 19
- 0
api-ref/source/samples/volume-connector-create-response.json View File

@@ -0,0 +1,19 @@
1
+{
2
+  "connector_id": "iqn.2017-07.org.openstack:01:d9a51732c3f",
3
+  "created_at": "2016-08-18T22:28:48.643434+11:11",
4
+  "extra": {},
5
+  "links": [
6
+    {
7
+      "href": "http://127.0.0.1:6385/v1/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
8
+      "rel": "self"
9
+    },
10
+    {
11
+      "href": "http://127.0.0.1:6385/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
12
+      "rel": "bookmark"
13
+    }
14
+  ],
15
+  "node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
16
+  "type": "iqn",
17
+  "updated_at": null,
18
+  "uuid": "9bf93e01-d728-47a3-ad4b-5e66a835037c"
19
+}

+ 23
- 0
api-ref/source/samples/volume-connector-list-detail-response.json View File

@@ -0,0 +1,23 @@
1
+{
2
+  "connectors": [
3
+    {
4
+      "connector_id": "iqn.2017-07.org.openstack:01:d9a51732c3f",
5
+      "created_at": "2016-08-18T22:28:48.643434+11:11",
6
+      "extra": {},
7
+      "links": [
8
+        {
9
+          "href": "http://127.0.0.1:6385/v1/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
10
+          "rel": "self"
11
+        },
12
+        {
13
+          "href": "http://127.0.0.1:6385/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
14
+          "rel": "bookmark"
15
+        }
16
+      ],
17
+      "node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
18
+      "type": "iqn",
19
+      "updated_at": null,
20
+      "uuid": "9bf93e01-d728-47a3-ad4b-5e66a835037c"
21
+    }
22
+  ]
23
+}

+ 20
- 0
api-ref/source/samples/volume-connector-list-response.json View File

@@ -0,0 +1,20 @@
1
+{
2
+  "connectors": [
3
+    {
4
+      "connector_id": "iqn.2017-07.org.openstack:01:d9a51732c3f",
5
+      "links": [
6
+        {
7
+          "href": "http://127.0.0.1:6385/v1/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
8
+          "rel": "self"
9
+        },
10
+        {
11
+          "href": "http://127.0.0.1:6385/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
12
+          "rel": "bookmark"
13
+        }
14
+      ],
15
+      "node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
16
+      "type": "iqn",
17
+      "uuid": "9bf93e01-d728-47a3-ad4b-5e66a835037c"
18
+    }
19
+  ]
20
+}

+ 7
- 0
api-ref/source/samples/volume-connector-update-request.json View File

@@ -0,0 +1,7 @@
1
+[
2
+   {
3
+      "path" : "/connector_id",
4
+      "value" : "iqn.2017-07.org.openstack:02:10190a4153e",
5
+      "op" : "replace"
6
+   }
7
+]

+ 19
- 0
api-ref/source/samples/volume-connector-update-response.json View File

@@ -0,0 +1,19 @@
1
+{
2
+  "connector_id": "iqn.2017-07.org.openstack:02:10190a4153e",
3
+  "created_at": "2016-08-18T22:28:48.643434+11:11",
4
+  "extra": {},
5
+  "links": [
6
+    {
7
+      "href": "http://127.0.0.1:6385/v1/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
8
+      "rel": "self"
9
+    },
10
+    {
11
+      "href": "http://127.0.0.1:6385/volume/connectors/9bf93e01-d728-47a3-ad4b-5e66a835037c",
12
+      "rel": "bookmark"
13
+    }
14
+  ],
15
+  "node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
16
+  "type": "iqn",
17
+  "updated_at": "2016-08-18T22:28:49.653974+00:00",
18
+  "uuid": "9bf93e01-d728-47a3-ad4b-5e66a835037c"
19
+}

+ 32
- 0
api-ref/source/samples/volume-list-response.json View File

@@ -0,0 +1,32 @@
1
+{
2
+  "connectors": [
3
+    {
4
+      "href": "http://127.0.0.1:6385/v1/volume/connectors",
5
+      "rel": "self"
6
+    },
7
+    {
8
+      "href": "http://127.0.0.1:6385/volume/connectors",
9
+      "rel": "bookmark"
10
+    }
11
+  ],
12
+  "links": [
13
+    {
14
+      "href": "http://127.0.0.1:6385/v1/volume/",
15
+      "rel": "self"
16
+    },
17
+    {
18
+      "href": "http://127.0.0.1:6385/volume/",
19
+      "rel": "bookmark"
20
+    }
21
+  ],
22
+  "targets": [
23
+    {
24
+      "href": "http://127.0.0.1:6385/v1/volume/targets",
25
+      "rel": "self"
26
+    },
27
+    {
28
+      "href": "http://127.0.0.1:6385/volume/targets",
29
+      "rel": "bookmark"
30
+    }
31
+  ]
32
+}

+ 7
- 0
api-ref/source/samples/volume-target-create-request.json View File

@@ -0,0 +1,7 @@
1
+{
2
+    "node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
3
+    "volume_type": "iscsi",
4
+    "boot_index": 0,
5
+    "volume_id": "04452bed-5367-4202-8bf5-de4335ac56d2"
6
+}
7
+

+ 21
- 0
api-ref/source/samples/volume-target-create-response.json View File

@@ -0,0 +1,21 @@
1
+{
2
+  "boot_index": 0,
3
+  "created_at": "2016-08-18T22:28:48.643434+11:11",
4
+  "extra": {},
5
+  "links": [
6
+    {
7
+      "href": "http://127.0.0.1:6385/v1/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
8
+      "rel": "self"
9
+    },
10
+    {
11
+      "href": "http://127.0.0.1:6385/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
12
+      "rel": "bookmark"
13
+    }
14
+  ],
15
+  "node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
16
+  "properties": {},
17
+  "updated_at": null,
18
+  "uuid": "bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
19
+  "volume_id": "04452bed-5367-4202-8bf5-de4335ac56d2",
20
+  "volume_type": "iscsi"
21
+}

+ 25
- 0
api-ref/source/samples/volume-target-list-detail-response.json View File

@@ -0,0 +1,25 @@
1
+{
2
+  "targets": [
3
+    {
4
+      "boot_index": 0,
5
+      "created_at": "2016-08-18T22:28:48.643434+11:11",
6
+      "extra": {},
7
+      "links": [
8
+        {
9
+          "href": "http://127.0.0.1:6385/v1/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
10
+          "rel": "self"
11
+        },
12
+        {
13
+          "href": "http://127.0.0.1:6385/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
14
+          "rel": "bookmark"
15
+        }
16
+      ],
17
+      "node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
18
+      "properties": {},
19
+      "updated_at": null,
20
+      "uuid": "bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
21
+      "volume_id": "04452bed-5367-4202-8bf5-de4335ac56d2",
22
+      "volume_type": "iscsi"
23
+    }
24
+  ]
25
+}

+ 21
- 0
api-ref/source/samples/volume-target-list-response.json View File

@@ -0,0 +1,21 @@
1
+{
2
+  "targets": [
3
+    {
4
+      "boot_index": 0,
5
+      "links": [
6
+        {
7
+          "href": "http://127.0.0.1:6385/v1/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
8
+          "rel": "self"
9
+        },
10
+        {
11
+          "href": "http://127.0.0.1:6385/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
12
+          "rel": "bookmark"
13
+        }
14
+      ],
15
+      "node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
16
+      "uuid": "bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
17
+      "volume_id": "04452bed-5367-4202-8bf5-de4335ac56d2",
18
+      "volume_type": "iscsi"
19
+    }
20
+  ]
21
+}

+ 7
- 0
api-ref/source/samples/volume-target-update-request.json View File

@@ -0,0 +1,7 @@
1
+[
2
+   {
3
+      "path" : "/volume_id",
4
+      "value" : "7211f7d3-3f32-4efc-b64e-9b8e92e64a8e",
5
+      "op" : "replace"
6
+   }
7
+]

+ 21
- 0
api-ref/source/samples/volume-target-update-response.json View File

@@ -0,0 +1,21 @@
1
+{
2
+  "boot_index": 0,
3
+  "created_at": "2016-08-18T22:28:48.643434+11:11",
4
+  "extra": {},
5
+  "links": [
6
+    {
7
+      "href": "http://127.0.0.1:6385/v1/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
8
+      "rel": "self"
9
+    },
10
+    {
11
+      "href": "http://127.0.0.1:6385/volume/targets/bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
12
+      "rel": "bookmark"
13
+    }
14
+  ],
15
+  "node_uuid": "6d85703a-565d-469a-96ce-30b6de53079d",
16
+  "properties": {},
17
+  "updated_at": "2016-08-18T22:28:49.653974+00:00",
18
+  "uuid": "bd4d008c-7d31-463d-abf9-6c23d9d55f7f",
19
+  "volume_id": "7211f7d3-3f32-4efc-b64e-9b8e92e64a8e",
20
+  "volume_type": "iscsi"
21
+}

Loading…
Cancel
Save