Datastores are storage systems which are shared across multiple virtual machines. Typically these are used in VMware environments and are not found in a modern cloud technology. This class 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 datastore resides in
attr datastore_id:
 The provider ID of the datastore
attr name:The name of the volume
attr date_created:
 The date when the datastore was created
attr max_file_size:
 The maximum size in bytes that can be allocated to a single file
attr free_space:
 The size in bytes available on the datastore
attr hypervisors:
 A list of hypervisors that share and have access to this datastore
class DivvyResource.Resources.datastore.Datastore(resource_id)

Bases: DivvyResource.Resources.toplevelresource.TopLevelResource

Datastore operations

static get_db_class()
static get_provider_id_field()
static get_resource_type()

Retrieve all the actions which are supported by this resource.

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)

handle_resource_destroyed(user_resource_id=None, project_resource_id=None)

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