This Page

The quantum.db.servicetype_db Module

exception quantum.db.servicetype_db.NoDefaultServiceDefinition(**kwargs)

Bases: quantum.common.exceptions.QuantumException

message = u'No default service definition in configuration file. Please add service definitions using the service_definition variable in the [DEFAULT_SERVICETYPE] section'
class quantum.db.servicetype_db.ServiceDefinition(**kwargs)

Bases: sqlalchemy.ext.declarative.Base, quantum.db.models_v2.HasId

driver
id
plugin
service_class
service_type_id
class quantum.db.servicetype_db.ServiceType(**kwargs)

Bases: sqlalchemy.ext.declarative.Base, quantum.db.models_v2.HasId, quantum.db.models_v2.HasTenant

Service Type Object Model

as_dict()

Convert a row into a dict

default
description
id
name
num_instances
service_definitions
tenant_id
exception quantum.db.servicetype_db.ServiceTypeInUse(**kwargs)

Bases: quantum.common.exceptions.InUse

message = u"There are still active instances of service type '%(service_type_id)s'. Therefore it cannot be removed."
class quantum.db.servicetype_db.ServiceTypeManager

Bases: object

Manage service type objects in Quantum database

create_service_type(context, service_type)

Create a new service type

decrease_service_type_refcount(context, id)

Decrease references count for a service type object

This method should be invoked by plugins using the service type concept everytime an instance of an object associated with a given service type is removed

delete_service_type(context, id)

Delete a service type

classmethod get_instance()
get_service_type(context, id, fields=None)

Retrieve a service type record

get_service_types(context, fields=None, filters=None)

Retrieve a possibly filtered list of service types

increase_service_type_refcount(context, id)

Increase references count for a service type object

This method should be invoked by plugins using the service type concept everytime an instance of an object associated with a given service type is created.

update_service_type(context, id, service_type)

Update a service type

exception quantum.db.servicetype_db.ServiceTypeNotFound(**kwargs)

Bases: quantum.common.exceptions.NotFound

message = u'Service type %(service_type_id)s could not be found '
quantum.db.servicetype_db.parse_service_definition_opt()

parse service definition opts and returns result