When I create a flavour through the API ( v2/{tenant_id}/flavors ), with a request like:
curl -i http://localhost:8774/v2/f6cb51c22ef94d80823ec498d5f94355/flavors -X POST -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "X-Auth-Token: fd72aee7935b4327847b3e7e7763425f" -d '{"flavor": {"disk": 10, "vcpus": 2, "ram": 1024, "name": "test_doesnot_work", "id": "1234", "swap": 22}}'
It returns me an error, and does not let me create the flavor.
The problem I've found is that OpenStack requires the "OS-FLV-EXT-DATA:ephemeral" extended attribute; otherwise, it will not let me create the flavor. For example the example below works fine:
curl -i http://localhost:8774/v2/f6cb51c22ef94d80823ec498d5f94355/flavors -X POST -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "X-Auth-Token: fd72aee7935b4327847b3e7e7763425f" -d '{"flavor": {"disk": 10, "vcpus": 2, "ram": 1024, "name": "test_fine", "id": "1234", "swap": 22,"OS-FLV-EXT-DATA:ephemeral" : 2}}'
OS-FLV-EXT-DATA:ephemeral is an attribute for The size of secondary drive, in GBs, to attach to a server. Is it always necessary to create a secondary drive to attach to a server when creating a VM ?
The OpenStack version is Essex
Which version is this?