cinder.objects.service module

cinder.objects.service module

class Service(context=None, **kwargs)

Bases: cinder.objects.base.CinderPersistentObject, cinder.objects.base.CinderObject, cinder.objects.base.CinderObjectDictCompat, cinder.objects.base.CinderComparableObject, cinder.objects.base.ClusteredObject

OPTIONAL_FIELDS = ('cluster',)
VERSION = '1.6'
active_backend_id
availability_zone
binary
cluster
cluster_name
create()
created_at
deleted
deleted_at
destroy()
disabled
disabled_reason
fields = {'active_backend_id': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'availability_zone': String(default=cinder,nullable=True), 'binary': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'cluster': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'cluster_name': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'deleted': Boolean(default=False,nullable=True), 'deleted_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'disabled': Boolean(default=False,nullable=True), 'disabled_reason': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'frozen': Boolean(default=False,nullable=False), 'host': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'id': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'modified_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'object_current_version': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'replication_status': ReplicationStatus(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True,valid_values=('error', 'enabled', 'disabled', 'not-capable', 'failover-error', 'failing-over', 'failed-over', 'enabling', 'disabling')), 'report_count': Integer(default=0,nullable=False), 'rpc_current_version': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'topic': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'uuid': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False)}
frozen
classmethod get_by_args(context, host, binary_key)
classmethod get_by_host_and_topic(context, host, topic, disabled=False)
classmethod get_by_uuid(context, service_uuid)
classmethod get_minimum_obj_version(context, binary=None)
classmethod get_minimum_rpc_version(context, binary)
host
id
is_up

Check whether a service is up based on last heartbeat.

model

alias of cinder.db.sqlalchemy.models.Service

modified_at
obj_load_attr(attrname)

Load an additional attribute from the real object.

This should load self.$attrname and cache any data that might be useful for future load operations.

obj_make_compatible(primitive, target_version)

Make a service representation compatible with a target version.

object_current_version
replication_status
report_count
rpc_current_version
save()

Save the changed fields back to the store.

This is optional for subclasses, but is presented here in the base class for consistency among those that do.

topic
updated_at
uuid
class ServiceList(*args, **kwargs)

Bases: cinder.objects.base.ObjectListBase, cinder.objects.base.CinderObject

VERSION = '1.1'
fields = {'objects': List(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False)}
classmethod get_all(context, filters=None)
classmethod get_all_by_binary(context, binary, disabled=None)
classmethod get_all_by_topic(context, topic, disabled=None)
objects
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.