Method | URI | Description |
---|---|---|
POST | /v2/{tenant_id}/flavors | Creates a flavor. Includes the rxtx_factor, OS-FLV-EXT-DATA:ephemeral, and swap extended attributes. |
Normal response codes: 200
This table shows the URI parameters for the create flavor with extra data request:
Name | Type | Description |
---|---|---|
| String | The ID for the tenant or account in a multi-tenancy cloud. |
Example 3.85. Create flavor with extra data: JSON request
{ "flavor": { "name": "flavortest", "ram": 1024, "vcpus": 2, "disk": 10, "id": "666", "rxtx_factor": 2.0, "OS-FLV-EXT-DATA:ephemeral": 30, "swap": 5 } }
Example 3.86. Create flavor with extra data: XML request
<?xml version="1.0" encoding="UTF-8"?> <flavor xmlns="http://docs.openstack.org/compute/api/v1.1" xmlns:OS-FLV-EXT-DATA="http://docs.openstack.org/compute/ext/flavor_extra_data/api/v1.1" name="flavortest" ram="1024" vcpus="2" disk="10" id="666" swap="5" rxtx_factor="2.0" OS-FLV-EXT-DATA:ephemeral="30" />
This operation does not require a request body.
Example 3.87. Create flavor with extra data: JSON response
{ "flavor": { "OS-FLV-EXT-DATA:ephemeral": 30, "disk": 10, "id": "666", "links": [ { "href": "http://openstack.example.com/v2/openstack/flavors/666", "rel": "self" }, { "href": "http://openstack.example.com/openstack/flavors/666", "rel": "bookmark" } ], "name": "flavortest", "ram": 1024, "vcpus": 2 } }
Example 3.88. Create flavor with extra data: XML response
<?xml version='1.0' encoding='UTF-8'?> <flavor xmlns:OS-FLV-EXT-DATA="http://docs.openstack.org/compute/ext/flavor_extra_data/api/v1.1" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="10" vcpus="2" ram="1024" name="flavortest" id="666" OS-FLV-EXT-DATA:ephemeral="30"> <atom:link href="http://openstack.example.com/v2/openstack/flavors/666" rel="self"/> <atom:link href="http://openstack.example.com/openstack/flavors/666" rel="bookmark"/> </flavor>
This operation does not return a response body.