1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
|
.. -*- rst -*-
Default Volume Types (default-types)
====================================
Manage a default volume type for individual projects.
By default, a volume-create request that does not specify a volume-type
will assign the configured system default volume type to the volume.
You can override this behavior on a per-project basis by setting a different
default volume type for any project.
Available in microversion 3.62 or higher.
NOTE: The default policy for list API is system admin so you would require
a system scoped token to access it.
To get a system scoped token, you need to run the following command:
openstack --os-system-scope all --os-project-name='' token issue
Create or update a default volume type
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: PUT /v3/default-types/{project-id}
Create or update the default volume type for a project
Response codes
--------------
.. rest_status_code:: success ../status.yaml
- 200
.. rest_status_code:: error ../status.yaml
- 400
- 404
Request Parameters
------------------
.. rest_parameters:: parameters.yaml
- project_id: project_id_path
- volume_type: volume_type_name_or_id
Request Example
---------------
.. literalinclude:: ./samples/set-default-type-request.json
:language: javascript
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- project_id: project_id
- volume_type_id: volume_type_id
Response Example
----------------
.. literalinclude:: ./samples/set-default-type-response.json
:language: javascript
Show a default volume type
~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v3/default-types/{project-id}
Show the default volume type for a project
Response codes
--------------
.. rest_status_code:: success ../status.yaml
- 200
.. rest_status_code:: error ../status.yaml
- 404
Request Parameters
------------------
.. rest_parameters:: parameters.yaml
- project_id: project_id_path
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- project_id: project_id
- volume_type_id: volume_type_id
Response Example
----------------
.. literalinclude:: ./samples/get-default-type-response.json
:language: javascript
List default volume types
~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: GET /v3/default-types/
Get a list of all default volume types
Response codes
--------------
.. rest_status_code:: success ../status.yaml
- 200
.. rest_status_code:: error ../status.yaml
- 404
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- project_id: project_id
- volume_type_id: volume_type_id
Response Example
----------------
.. literalinclude:: ./samples/get-default-types-response.json
:language: javascript
Delete a default volume type
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. rest_method:: DELETE /v3/default-types/{project-id}
Unset the default volume type for a project.
This operation does not do anything to the volume type itself.
It simply removes the volume type from being the default volume type for
the specified project.
Response codes
--------------
.. rest_status_code:: success ../status.yaml
- 204
.. rest_status_code:: error ../status.yaml
- 404
Request Parameters
------------------
.. rest_parameters:: parameters.yaml
- project_id: project_id_path
|