Difference between revisions of "Nova-scheduled-images-extension"
Line 19: | Line 19: | ||
== New Resources == | == 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 | + | 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 positive 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. | 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. | Scheduled images (and the associated retention value) are configurable per server. | ||
Line 34: | Line 34: | ||
{ | { | ||
"scheduled_image" : { | "scheduled_image" : { | ||
− | "retention": | + | "retention": <positive integer> |
} | } | ||
} | } | ||
</nowiki></pre> | </nowiki></pre> | ||
− | Retention: Specifies the number of snapshots created by the scheduled images service to keep for | + | Retention: Specifies the number of snapshots created by the scheduled images service to keep for a server. |
− | If a retention value has already been specified for an | + | If a retention value has already been specified for an server, it is overridden. |
+ | |||
+ | Error Conditions: a negative integer or zero is used as the retention value. | ||
=== Disable scheduled images === | === Disable scheduled images === | ||
Line 57: | Line 59: | ||
</nowiki></pre> | </nowiki></pre> | ||
− | (If the scheduled images feature is not enabled for this | + | (If the scheduled images feature is not enabled for this server, the API will return a 404.) |
Response Body: | Response Body: | ||
Line 64: | Line 66: | ||
{ | { | ||
"serverId": <UUID>, | "serverId": <UUID>, | ||
− | "retention": | + | "retention": <positive integer>, |
} | } | ||
</nowiki></pre> | </nowiki></pre> | ||
− | === List all | + | === List all servers with scheduled images enabled === |
<pre><nowiki> | <pre><nowiki> | ||
Line 82: | Line 84: | ||
"scheduledImages" : [ | "scheduledImages" : [ | ||
{ | { | ||
− | " | + | "serverId": <UUID>, |
− | "retention": | + | "retention": <positive integer>, |
} | } | ||
] | ] |
Revision as of 21:21, 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 positive 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": <positive integer> } }
Retention: Specifies the number of snapshots created by the scheduled images service to keep for a server. If a retention value has already been specified for an server, it is overridden.
Error Conditions: a negative integer or zero is used as the retention value.
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 server, the API will return a 404.)
Response Body:
{ "serverId": <UUID>, "retention": <positive integer>, }
List all servers with scheduled images enabled
GET /{tenantId}/servers/OS-SI/scheduled_images
Response Body:
{ "scheduledImages" : [ { "serverId": <UUID>, "retention": <positive integer>, } ] }
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" } ] } ] }