Service App

A cloud provider app within an organization service. 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 organization service (cloud) this access list belongs to
attr region_name:
 The region that the service app resides in
attr app_id:The ID of the app
attr name:The name of the service app
attr date_created:
 The date the service app was created
class DivvyResource.Resources.serviceapp.ServiceApp(resource_id)

Bases: DivvyResource.Resources.toplevelresource.TopLevelResource

Describes an application within an organization service

delete(user_resource_id=None)

Delete this cloud app. It is wrapped in a with JobQueue() block, this will queue the delete job to the wrapped queue

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

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 groups, alerts, etc)

handle_resource_destroyed(user_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 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

service_app
start(user_resource_id=None)

Start this cloud app. It is wrapped in a with JobQueue() block, this will queue the stop job to the wrapped queue

stop(user_resource_id=None)

Stop this cloud app. It is wrapped in a with JobQueue() block, this will queue the stop job to the wrapped queue

suspend(user_resource_id=None)

Suspend this cloud app. It is wrapped in a with JobQueue() block, this will queue the suspend job to the wrapped queue

top_level_resource = True