Images

An “image” is a snapshot from which you can create new server instances.

From Rackspace’s own API documentation:

An image is a collection of files used to create or rebuild a server. Rackspace provides a number of pre-built OS images by default. You may also create custom images from cloud servers you have launched. These custom images are useful for backup purposes or for producing “gold” server images if you plan to deploy a particular server configuration frequently.

Classes

class cloudservers.ImageManager(api)

Manage Image resources.

get(image)

Get an image.

Parameters:
  • image – The ID of the image to get.
Return type:

Image

list()

Get a list of all images.

Return type:list of Image
find(**kwargs)

Find a single item with attributes matching **kwargs.

This isn’t very efficient: it loads the entire list then filters on the Python side.

findall(**kwargs)

Find all items with attributes matching **kwargs.

This isn’t very efficient: it loads the entire list then filters on the Python side.

create(name, server)

Create a new image by snapshotting a running Server

Parameters:
  • name – An (arbitrary) name for the new image.
  • server – The Server (or its ID) to make a snapshot of.
Return type:

Image

delete(image)

Delete an image.

It should go without saying that you can’t delete an image that you didn’t create.

Parameters:
  • image – The Image (or its ID) to delete.
class cloudservers.Image(manager, info)

An image is a collection of files used to create or rebuild a server.

id

This image’s ID.

name

This image’s name.

created

The date/time this image was created.

updated

The date/time this instance was updated.

status

The status of this image (usually "SAVING" or ACTIVE).

progress

During saving of an image this’ll be set to something between 0 and 100, representing a rough percentage done.

serverId

If this image was created from a Server then this attribute will be set to the ID of the server whence this image came.

delete()

Delete this image.

Table Of Contents

Previous topic

Flavors

Next topic

Shared IP addresses

This Page