Difference between revisions of "Nova-scheduled-images-extension"
Line 43: | Line 43: | ||
=== Disable scheduled images === | === Disable scheduled images === | ||
+ | Disable scheduled images by deleting the resource "marker" that indicates that the scheduled images service should create snapshots of this server. | ||
<pre><nowiki> | <pre><nowiki> |
Revision as of 17:31, 28 January 2013
Nova Scheduled Images API Extension
<<TableOfContents()>>
Summary
- Name
- Scheduled Images Extension
- Namespace
- `http://docs.openstack.org/servers/api/ext/scheduled_images/v1.0`
- Alias
- OS-SI
- Dependencies
- OpenStack Compute API v1.1
- Short Description
- Enables automatic daily images to be taken of a server.
- Doc Link (WADL)
- (Forthcoming.)
- Doc Link (XSD)
- (Forthcoming.)
- New Headers
- None.
- New Faults
- None.
- New Actions
- None.
- New Resources
- Detailed below.
New Resources
A new resource is created at `/{tenantId}/servers/{serverId}/OS-SI/scheduled_images` to indicate that this server will be monitored by the scheduled images service. This resource contains a non-negative integer value, the `retention`. The `retention` value indicates the number of images created by the scheduled images service that will be retained in the user's cloud storage account. Scheduled images (and the associated retention value) are configurable per server.
Enable scheduled images
POST /{tenantId}/servers/{serverId}/OS-SI/scheduled_images
Request body:
{ "scheduled_image" : { "retention": INT } }
Retention: Specifies the number of snapshots created by the scheduled images service to keep for an instance. If a retention value has already been specified for an instance, it is overridden.
Disable scheduled images
Disable scheduled images by deleting the resource "marker" that indicates that the scheduled images service should create snapshots of this server.
DELETE /{tenantId}/servers/{serverId}/OS-SI/scheduled_images
No response body.
Show scheduled images setting
GET /{tenantId}/servers/{serverId}/OS-SI/scheduled_images
(If the scheduled images feature is not enabled for this instance, the API will return a 404.)
Response Body:
{ "serverId": <UUID>, "retention": INT, }
List all instances with scheduled images enabled
GET /{tenantId}/servers/OS-SI/scheduled_images
Response Body:
{ "scheduledImages" : [ { "instance": <UUID>, "retention": INT, } ] }
Sample Extension Query Responses
Extension Query Response: XML
<?xml version="1.0" encoding="UTF-8"?> <extensions xmlns="http://docs.openstack.org/common/api/v1.0" xmlns:atom="http://www.w3.org/2005/Atom"> <extension name="Scheduled Images Extension" namespace="http://docs.openstack.org/servers/api/ext/scheduled_images/v1.0" alias="OS-SI" updated="2013-01-11T16:40:00-04:00"> <description> Enables automatic daily images to be taken of a server. </description> <atom:link rel="describedby" type="application/pdf" href="http://docs.openstack.org/servers/api/ext/scheduled_images.pdf"/> <atom:link rel="describedby" type="application/xml" href="http://docs.openstack.org/servers/api/ext/scheduled_images/scheduled_images.wadl"/> </extension> </extensions>
Extension Query Response: JSON
{ "extensions": [ { "name": "Scheduled Images Extension", "namespace": "http://docs.openstack.org/servers/api/ext/scheduled_images/v1.0", "alias": "OS-SI", "updated": "2013-01-11T16:40:00-04:00", "description": "Enables automatic daily images to be taken of a server.", "links": [ { "rel": "describedby", "type": "application/pdf", "href": "http://docs.openstack.org/servers/api/ext/scheduled_images.pdf" }, { "rel": "describedby", "type": "application/xml", "href": "http://docs.openstack.org/servers/api/ext/scheduled_images/scheduled_images.wadl" } ] } ] }