Memcache Instances

Memcache Instances are managed systems with one or more caching technologies installed (eg: Redis). Examples of this would be AWS Elasticache and Azure Redis. 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 region_name:
 The region that the instance resides in
attr instance_id:
 The provider ID of the instance
attr name:The name of the instance
attr instance_type:
 The type of instance
attr instance_flavor_resource_id:
 The resource ID of the type (flavor) this is instance runs on
attr state:The state that the instance is in
attr availability_zone:
 The availability zone where this instance runs
attr endpoint_address:
 The FQDN of the instance
attr endpoint_port:
 The port that the instance listens on
attr engine:The engine that the database uses (eg: mysq)
attr engine_version:
 The install version of the engine
attr create_time:
 The time this instance was created
attr access_lists:
 Returns a list of associated security groups
attr instance_flavor:
 Returns a flavor object which contains information on the size of the instance
class DivvyResource.Resources.memcacheinstance.MemcacheInstance(resource_id)

Bases: DivvyResource.Resources.toplevelresource.TopLevelResource

Memcache instance 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()

Retrieve the instance type of the resource

static get_provider_id_field()
static get_resource_type()

Retrieve a list of db objects for snapshots created within from this memcache instance (if any)


Retrieve the memcache instance state

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