Private Images

Private Images provide protected information that is required to launch an instance. This class inherits from TopLevelResource and has direct access to the resource’s database object. The following attributes are directly accessible:

attr resource_id:
 The primary resource identifier that takes the form of a prefix followed by numbers and letters
attr organization_service_id:
 The ID of the parent organization service (cloud)
attr image_id:The ID of the image
attr name:The name of the image
attr root_device_type:
 The original device type (ebs, snapshot, etc)
attr architecture:
 Architechture type (e.g. x86_64, x86_32)
attr min_ram:Integer representing the minimum memory required for use of this image
attr min_disk:Integer representing the minimum disk space required for use of this image
attr state:The state of this private image
attr description:
 Text description of this image
attr region_name:
 The region in which this image was taken
attr platform:The platform the image was taken on (linux/windows)
attr block_device_mapping:
 Information regarding this image
attr virtualization_type:
 Denotes the virtualization type (paravirtual [PV] or hardware virtual machine [HVM])
attr shared:Returns a boolean value that returns whether or not the image is shared
attr product_code:
 Product code (25 digit alphanumeric code identifying the private image)
attr product_code_type:
 Product code type (marketplace, none)
class DivvyResource.Resources.privateimage.PrivateImage(resource_id)

Bases: DivvyResource.Resources.toplevelresource.TopLevelResource

Private Image operations

Delete this resource. If wrapped in a with JobQueue() block, this will queue the deletion job to the wrapped queue, otherwise it
calls immediately.

Retrieve the time from the provider that this resource was created (if available).

static get_db_class()
static get_provider_id_field()
static get_resource_type()
handle_resource_created(user_resource_id=None, project_resource_id=None)

This should be called when a resource is created/discovered after the basic data is added to the database. This gives an opportunity for post-addition hooks (assignment to projects/groups, alerts, etc)


This should be called when a resource is destroyed before the basic data is removed from the database. This gives an opportunity for pre-destruction hooks (removal from projects/groups, alerts, etc)

handle_resource_modified(resource, *args, **kwargs)

This should be called when a resource is modified after the new data has been updated in the DB session This gives an opportunity for post-modification hooks

top_level_resource = True