pyrax
Python Bindings for the Rackspace Cloud
 All Classes Namespaces Files Functions Variables Properties
Public Member Functions
ImageManager Class Reference

Manager class for an Image. More...

Inheritance diagram for ImageManager:
BaseManager FakeImageManager

List of all members.

Public Member Functions

def list
 Returns a list of resource objects.
def list_all
 Returns all of the images in one call, rather than in paginated batches.
def update
 Accepts an image reference (object or ID) and dictionary of key/value pairs, where the key is an attribute of the image, and the value is the desired new value for that image.
def update_image_member
 Updates the image whose ID is given with the status specified.

Detailed Description

Manager class for an Image.


Member Function Documentation

def list (   self,
  limit = None,
  marker = None,
  name = None,
  visibility = None,
  member_status = None,
  owner = None,
  tag = None,
  status = None,
  size_min = None,
  size_max = None,
  sort_key = None,
  sort_dir = None,
  return_raw = False 
)

Returns a list of resource objects.

Pagination is supported through the optional 'marker' and 'limit' parameters. Filtering the returned value is possible by specifying values for any of the other parameters.

def list_all (   self,
  name = None,
  visibility = None,
  member_status = None,
  owner = None,
  tag = None,
  status = None,
  size_min = None,
  size_max = None,
  sort_key = None,
  sort_dir = None 
)

Returns all of the images in one call, rather than in paginated batches.

The 'next' uri contains a redundant version number. We need to strip it to use in the method_get() call.

def update (   self,
  img,
  value_dict 
)

Accepts an image reference (object or ID) and dictionary of key/value pairs, where the key is an attribute of the image, and the value is the desired new value for that image.

NOTE: There is a bug in Glance where the 'add' operation returns a 409 if the property already exists, which conflicts with the spec. So to get around this a fresh copy of the image must be retrieved, and the value of 'op' must be determined based on whether this attribute exists or not.

def update_image_member (   self,
  img_id,
  status 
)

Updates the image whose ID is given with the status specified.

This must be called by the user whose project_id is in the members for the image. If called by the owner of the image, an InvalidImageMember exception will be raised.

Valid values for 'status' include: pending accepted rejected Any other value will result in an InvalidImageMemberStatus exception being raised.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Properties