Scyld Cloud Controller Documentation
Server Image API
The Server-Image API presents an interface for querying available images within a particular Scyld Cloud Controller. An image is a full Operating System image that a Server-Instance can be created from.
Server-Image Object
A server-image object has the following properties:
- id - string. A UUID uniquely identifying the Server-Image object.
- name - string. A descriptive name for the image.
- public - boolean. Image is available to all users if true, or a private subset of users if false.
- operating-system - object. Contains a name and version of the Operating System the image contains.
- min-disk - integer. The minimum amount of disk space required to hold the image.
- min-ram - integer. The minimum amount of RAM required to boot the image.
- creation-date - string. The date the image was created/uploaded.
- active - boolean. Image is available to boot new server-instances from if true, otherwise false.
API Methods
/server-image
The /server-image API only accepts HTTP GET.
GET
An HTTP GET on /server-image will return a list of Server-Image objects that the requester has access to. This will include all public images, and any private images.
Server-Image Response Schema
The response for GET /server-image is governed by the following JSON-Schema:
{ "name": "server-image reponse data", "description": "Response data for server-image requests. Contains details of server-images", "type": "array", "items": { "title": "A server-image object", "type": "object", "properties": { "id": { "description": "server-image id", "type": "string", "required": True }, "name": { "description": "image name", "type": "string", "required": True }, "public": { "description": "Whether or not image is public", "type": "boolean", "required": True }, "operating-system": { "description": "Operating system name and version", "type": "object", "properties": { "name": { "type": "string", "required": True }, "major_version": { "type": "string", "required": True }, "minor_version": { "type": "string", "required": True } }, "additionalProperties": False, "required": True }, "min-disk": { "description": "minimum disk space (GB) needed for image", "type": "integer", "required": True }, "min-ram": { "description": "minimum RAM (MB) needed for image", "type": "integer", "required": True }, "creation-date": { "description": "Time stamp of when image was created", "type": "string", "format": "date-time", "required": True }, "active": { "description": "Whether or not image is available for new instance creation", "type": "boolean", "required": True } }, "additionalProperties": False, "required": True }, "additionalItems": False, "minItems": 0 }
Examples
Get a list of server-images you have access to:
# curl -X GET -H "X-Auth-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "X-Auth-Cloudauth-Id: 00000000000000000000000000000000" https://localhost/v1/server-image | python -m json.tool { "data": [ { "active": true, "creation-date": "2013-04-17T18:50:19Z", "id": "d30256b9-9fcb-4178-83b0-ead2243fc0e1", "min-disk": 5, "min-ram": 256, "name": "MT2 Login Node (CentOS 7)", "operating-system": { "major_version": "7", "minor_version": "8", "name": "CentOS" }, "public": true }, { "active": false, "creation-date": "2013-04-04T15:27:14Z", "id": "66d63657-580b-4a49-9660-5427c861c5f6", "min-disk": 5, "min-ram": 256, "name": "loginnode-OLD", "operating-system": { "major_version": "7", "minor_version": "4", "name": "CentOS" }, "public": true }, { "active": false, "creation-date": "2013-02-13T17:41:24Z", "id": "3509f9cd-73fc-4351-a6b9-4e71648c9f0b", "min-disk": 5, "min-ram": 128, "name": "centos63_base", "operating-system": { "major_version": "6", "minor_version": "3", "name": "CentOS" }, "public": false } ], "msg": "", "success": true }
/server-image/<ID>
The /server-image/<id> URI only accepts HTTP GET.
The <id> field here is a UUID of an existing image.
GET
An HTTP GET on /server-image/<id> returns data in the exact same format as /server-image Server-Image Response Schema but will contain at most one item – the image referenced by UUID.