Service Region

Service Regions consists of low-latency linked Availability Zones, which consist of multiple, linked data centers. For example, AWS’s us-east-1 Service Region consists of (at the moment), Availability Zones us-east-1a through us-east-1e and each Availability Zone consists of 1 to 6 data centers, each of which typically houses several thousand servers.

This class inherits from Resource and has direct access to the resource’s database object. The following attributes are directly accessible:

attr organization_service_id:
 The ID of the parent organization service (cloud)
attr name:The name of the region
attr state:Whether the region is in service, recently removed or added, or disabled
attr harvest_rate_multiplier:
 The rate at which the region is harvested with Aggressive = 4 x Standard and Passive = Standard / 4
class DivvyResource.Resources.serviceregion.ServiceRegion(resource_id)

Bases: DivvyResource.Resources.resource.Resource

Describes a region within a organization service

static get_db_class()

Obtain the property name to lookup based on the type :param limit: The resource type :return:

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 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 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