Scyld Cloud Controller Documentation
Server Flavor API
The Server-Flavor API presents an interface for querying available flavors within Scyld Cloud Controller. A flavor defines the resources for a virtual machine, meaning its RAM, core count, and hard disk space.
Server-Flavor Object
A server-flavor object has the following properties:
- id – integer. An ID that identifies the particular flavor.
- name – string. Name given to the flavor, for descriptive purposes.
- memory – integer. Amount of RAM in MB.
- disk – integer. Amount of disk space in GB.
- vcpu – integer. Number of CPU cores present within the VM.
API Methods
/server-flavor
The /server-flavor URI accepts HTTP GET only.
GETΒΆ
An HTTP GET on /server-flavor will return a list of all accessible server-flavors
Server-Flavor Response Schema
The response for GET /server-flavor is goerned by the following JSON-Schema:
{ "name": "server-flavor reponse data", "description": "Response data for server-flavor requests. Contains details of server-flavors", "type": "array", "items": { "title": "A server-flavor object", "type": "object", "properties": { "id": { "description": "server-flavor id", "type": "string", "required": True }, "name": { "description": "flavor name", "type": "string", "required": True }, "memory": { "description": "RAM in MB", "type": "integer", "required": True }, "disk": { "description": "disk space in GB", "type": "integer", "required": True }, "vcpu": { "description": "number of vCPUs", "type": "integer", "required": True } }, "additionalProperties": False, "required": True }, "additionalItems": False, "minItems": 0 }
Examples
Get a list of server-flavors within a particular Scyld Cloud Controller:
# curl -X GET -H "X-Auth-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "X-Auth-Cloudauth-Id: 00000000000000000000000000000000" https://localhost/v1/server-flavor | python -m json.tool { "data": [ { "disk": 5, "id": "1", "memory": 256, "name": "pod.free", "vcpu": 1 } ], "msg": "", "success": true }
/server-flavor/<ID>
The /server-flavor/<id> URI only accepts HTTP GET.
The <id> field here is the id of an existing server-flavor.
GET
An HTTP GET on /server-flavor/<id> will return data in the exact same format as /server-flavor, but will contain at most one time – the flavor referenced by <id>.