Attaches shares that are created through the Manila share API to server instances. Also, lists share attachments for a server, shows details for a share attachment, and detaches a share (New in version 2.97).
.. rest_method:: GET /servers/{server_id}/shares
List share attachments for an instance.
Normal response codes: 200
Error response codes: badrequest(400), forbidden(403), itemNotFound(404)
.. rest_parameters:: parameters.yaml - server_id: server_id_path
.. rest_parameters:: parameters.yaml - shares: shares_body - share_id: share_id_body - status: share_status_body - tag: share_tag_body
Example List share attachments for an instance: JSON response
.. literalinclude:: ../../doc/api_samples/os-server-shares/v2.97/server-shares-list-resp.json :language: javascript
.. rest_method:: POST /servers/{server_id}/shares
Attach a share to an instance.
Normal response codes: 201
Error response codes: badRequest(400), forbidden(403), itemNotFound(404), conflict(409)
Note
This action is only valid when the server is in STOPPED state.
Note
This action also needs specific configurations, check the documentation requirements to configure your environment and support this feature.
.. rest_parameters:: parameters.yaml - server_id: server_id_path - share_id: share_id_body - tag: share_tag_body
Example Attach a share to an instance: JSON request
.. literalinclude:: ../../doc/api_samples/os-server-shares/v2.97/server-shares-create-req.json :language: javascript
.. rest_parameters:: parameters.yaml - shares: shares_body - share_id: share_id_body - status: share_status_body - tag: share_tag_body
Example Attach a share to an instance: JSON response
.. literalinclude:: ../../doc/api_samples/os-server-shares/v2.97/server-shares-create-resp.json :language: javascript
.. rest_method:: GET /servers/{server_id}/shares/{share_id}
Show a detail of a share attachment.
Normal response codes: 200
Error response codes: badRequest(400), forbidden(403), itemNotFound(404)
.. rest_parameters:: parameters.yaml - server_id: server_id_path - share_id: share_id_path
.. rest_parameters:: parameters.yaml - share: share_body - uuid: share_uuid_body - share_id: share_id_body - status: share_status_body - tag: share_tag_body - export_location: share_export_location_body
Note
Optional fields can only be seen by admins.
Example Show a detail of a share attachment: JSON response
.. literalinclude:: ../../doc/api_samples/os-server-shares/v2.97/server-shares-show-resp.json :language: javascript
Example Show a detail of a share attachment with admin rights: JSON response
.. literalinclude:: ../../doc/api_samples/os-server-shares/v2.97/server-shares-admin-show-resp.json :language: javascript
.. rest_method:: DELETE /servers/{server_id}/shares/{share_id}
Detach a share from an instance.
Normal response codes: 200
Error response codes: badRequest(400), forbidden(403), itemNotFound(404), conflict(409)
Note
This action is only valid when the server is in STOPPED or ERROR state.
.. rest_parameters:: parameters.yaml - server_id: server_id_path - share_id: share_id_path
No body is returned on successful request.