The karbor.db.sqlalchemy.models Module

SQLAlchemy models for karbor data.

class karbor.db.sqlalchemy.models.CheckpointRecord(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, karbor.db.sqlalchemy.models.KarborBase

Represents a checkpoint record.

checkpoint_id
checkpoint_status
create_by
created_at
deleted
deleted_at
extend_info
id
operation_id
plan_id
project_id
provider_id
updated_at
class karbor.db.sqlalchemy.models.KarborBase

Bases: oslo_db.sqlalchemy.models.TimestampMixin, oslo_db.sqlalchemy.models.ModelBase

Base class for karbor Models.

delete(session)

Delete this object.

deleted = Column(None, Boolean(), table=None, default=ColumnDefault(False))
deleted_at = Column(None, DateTime(), table=None)
metadata = None
class karbor.db.sqlalchemy.models.OperationLog(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, karbor.db.sqlalchemy.models.KarborBase

Represents a operation log.

created_at
deleted
deleted_at
ended_at
entries
error
id
project_id
scheduled_operation_id
started_at
state
updated_at
class karbor.db.sqlalchemy.models.Plan(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, karbor.db.sqlalchemy.models.KarborBase

Represents a Plan.

created_at
deleted
deleted_at
description
id
name
parameters
project_id
provider_id
status
updated_at
class karbor.db.sqlalchemy.models.Resource(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, karbor.db.sqlalchemy.models.KarborBase

Represents a resource in a plan.

created_at
deleted
deleted_at
id
plan
plan_id
resource_extra_info
resource_id
resource_name
resource_type
updated_at
class karbor.db.sqlalchemy.models.Restore(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, karbor.db.sqlalchemy.models.KarborBase

Represents a Restore.

checkpoint_id
created_at
deleted
deleted_at
id
parameters
project_id
provider_id
resources_reason
resources_status
restore_target
status
updated_at
class karbor.db.sqlalchemy.models.ScheduledOperation(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, karbor.db.sqlalchemy.models.KarborBase

Represents a scheduled operation.

created_at
deleted
deleted_at
description
enabled
id
name
operation_definition
operation_type
project_id
trigger
trigger_id
updated_at
user_id
class karbor.db.sqlalchemy.models.ScheduledOperationLog(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, karbor.db.sqlalchemy.models.KarborBase

Represents a scheduled operation log.

actual_start_time
created_at
deleted
deleted_at
end_time
expect_start_time
extend_info
id
operation_id
state
triggered_time
updated_at
class karbor.db.sqlalchemy.models.ScheduledOperationState(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, karbor.db.sqlalchemy.models.KarborBase

Represents a scheduled operation state.

created_at
deleted
deleted_at
end_time_for_run
id
operation
operation_id
service_id
state
trust_id
updated_at
class karbor.db.sqlalchemy.models.Service(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, karbor.db.sqlalchemy.models.KarborBase

Represents a running service on a host.

binary
created_at
deleted
deleted_at
disabled
disabled_reason
host
id
modified_at
report_count
rpc_available_version
rpc_current_version
topic
updated_at
class karbor.db.sqlalchemy.models.Trigger(**kwargs)

Bases: sqlalchemy.ext.declarative.api.Base, karbor.db.sqlalchemy.models.KarborBase

Represents a trigger.

created_at
deleted
deleted_at
id
name
project_id
properties
type
updated_at
karbor.db.sqlalchemy.models.register_models()

Register Models and create metadata.

Called from karbor.db.sqlalchemy.__init__ as part of loading the driver, it will never need to be called explicitly elsewhere unless the connection is lost and needs to be reestablished.