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 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300
|
.. -*- rst -*-
=========
Flavors
=========
Show and manage server flavors.
Flavors are a way to describe the basic dimensions of a server to be
created including how much ``cpu``, ``ram``, and ``disk space`` are
allocated to a server built with this flavor.
List Flavors
============
.. rest_method:: GET /flavors
Lists all flavors accessible to your project.
Normal response codes: 200
Error response codes: unauthorized(401), forbidden(403)
Request
-------
.. rest_parameters:: parameters.yaml
- sort_key: sort_key_flavor
- sort_dir: sort_dir_flavor
- limit: limit
- marker: marker
- minDisk: minDisk
- minRam: minRam
- is_public: flavor_is_public_query
Response
--------
.. rest_parameters:: parameters.yaml
- flavors: flavors
- id: flavor_id_body
- name: flavor_name
- description: flavor_description_resp
- links: links
**Example List Flavors (v2.55)**
.. literalinclude:: ../../doc/api_samples/flavors/v2.55/flavors-list-resp.json
:language: javascript
Create Flavor
=============
.. rest_method:: POST /flavors
Creates a flavor.
Creating a flavor is typically only available to administrators of a
cloud because this has implications for scheduling efficiently in the cloud.
.. note::
Flavors with special characters in the flavor ID, except the hyphen '-',
underscore '_', spaces and dots '.', are not permitted.
Flavor IDs are meant to be UUIDs. Serialized strings separated/grouped by "-"
represent the default flavor ID or UUID. eg: 01cc74d8-4816-4bef-835b-e36ff188c406.
Only for backward compatibility, an integer as a flavor ID is permitted.
Normal response codes: 200
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
conflict(409)
Request
-------
.. rest_parameters:: parameters.yaml
- flavor: flavor
- name: flavor_name
- description: flavor_description
- id: flavor_id_body_create
- ram: flavor_ram
- disk: flavor_disk
- vcpus: flavor_cpus
- OS-FLV-EXT-DATA:ephemeral: flavor_ephem_disk_in
- swap: flavor_swap_in
- rxtx_factor: flavor_rxtx_factor_in
- os-flavor-access:is_public: flavor_is_public_in
**Example Create Flavor (v2.55)**
.. literalinclude:: ../../doc/api_samples/flavor-manage/v2.55/flavor-create-post-req.json
:language: javascript
Response
--------
.. rest_parameters:: parameters.yaml
- flavor: flavor
- name: flavor_name
- description: flavor_description_resp
- id: flavor_id_body
- ram: flavor_ram
- disk: flavor_disk
- vcpus: flavor_cpus
- links: links
- OS-FLV-EXT-DATA:ephemeral: flavor_ephem_disk
- OS-FLV-DISABLED:disabled: flavor_disabled
- swap: flavor_swap
- rxtx_factor: flavor_rxtx_factor
- os-flavor-access:is_public: flavor_is_public
- extra_specs: extra_specs_2_61
**Example Create Flavor (v2.75)**
.. literalinclude:: ../../doc/api_samples/flavor-manage/v2.75/flavor-create-post-resp.json
:language: javascript
List Flavors With Details
=========================
.. rest_method:: GET /flavors/detail
Lists flavors with details.
Normal response codes: 200
Error response codes: badRequest(400), unauthorized(401), forbidden(403)
Request
-------
.. rest_parameters:: parameters.yaml
- sort_key: sort_key_flavor
- sort_dir: sort_dir_flavor
- limit: limit
- marker: marker
- minDisk: minDisk
- minRam: minRam
- is_public: flavor_is_public_query
Response
--------
.. rest_parameters:: parameters.yaml
- flavors: flavors
- name: flavor_name
- description: flavor_description_resp
- id: flavor_id_body
- ram: flavor_ram
- disk: flavor_disk
- vcpus: flavor_cpus
- links: links
- OS-FLV-EXT-DATA:ephemeral: flavor_ephem_disk
- OS-FLV-DISABLED:disabled: flavor_disabled
- swap: flavor_swap
- rxtx_factor: flavor_rxtx_factor
- os-flavor-access:is_public: flavor_is_public
- extra_specs: extra_specs_2_61
**Example List Flavors With Details (v2.75)**
.. literalinclude:: ../../doc/api_samples/flavors/v2.75/flavors-detail-resp.json
:language: javascript
Show Flavor Details
===================
.. rest_method:: GET /flavors/{flavor_id}
Shows details for a flavor.
Normal response codes: 200
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404)
Request
-------
.. rest_parameters:: parameters.yaml
- flavor_id: flavor_id
Response
--------
.. rest_parameters:: parameters.yaml
- flavor: flavor
- name: flavor_name
- description: flavor_description_resp
- id: flavor_id_body
- ram: flavor_ram
- disk: flavor_disk
- vcpus: flavor_cpus
- links: links
- OS-FLV-EXT-DATA:ephemeral: flavor_ephem_disk
- OS-FLV-DISABLED:disabled: flavor_disabled
- swap: flavor_swap
- rxtx_factor: flavor_rxtx_factor
- os-flavor-access:is_public: flavor_is_public
- extra_specs: extra_specs_2_61
**Example Show Flavor Details (v2.75)**
.. literalinclude:: ../../doc/api_samples/flavors/v2.75/flavor-get-resp.json
:language: javascript
Update Flavor Description
=========================
.. rest_method:: PUT /flavors/{flavor_id}
Updates a flavor description.
This API is available starting with microversion 2.55.
Policy defaults enable only users with the administrative role to
perform this operation. Cloud providers can change these permissions
through the ``policy.json`` file.
Normal response codes: 200
Error response codes: badRequest(400), unauthorized(401), forbidden(403), itemNotFound(404)
Request
-------
.. rest_parameters:: parameters.yaml
- flavor_id: flavor_id
- flavor: flavor
- description: flavor_description_required
**Example Update Flavor Description (v2.55)**
.. literalinclude:: ../../doc/api_samples/flavor-manage/v2.55/flavor-update-req.json
:language: javascript
Response
--------
.. rest_parameters:: parameters.yaml
- flavor: flavor
- name: flavor_name
- description: flavor_description_resp_no_min
- id: flavor_id_body
- ram: flavor_ram
- disk: flavor_disk
- vcpus: flavor_cpus
- links: links
- OS-FLV-EXT-DATA:ephemeral: flavor_ephem_disk
- OS-FLV-DISABLED:disabled: flavor_disabled
- swap: flavor_swap
- rxtx_factor: flavor_rxtx_factor
- os-flavor-access:is_public: flavor_is_public
- extra_specs: extra_specs_2_61
**Example Update Flavor Description (v2.75)**
.. literalinclude:: ../../doc/api_samples/flavor-manage/v2.75/flavor-update-resp.json
:language: javascript
Delete Flavor
=============
.. rest_method:: DELETE /flavors/{flavor_id}
Deletes a flavor.
This is typically an admin only action. Deleting a flavor that is in use by
existing servers is not recommended as it can cause incorrect data to
be returned to the user under some operations.
Normal response codes: 202
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404)
Request
-------
.. rest_parameters:: parameters.yaml
- flavor_id: flavor_id
Response
--------
No body content is returned on a successful DELETE.
|