karbor/doc/source/api/class_diagram.pu
chenying 1c60dac7fa Change Smaug to Karbor
There was a decision in the community to change the project name.

Change-Id: I8b3d538b9573ebaa2a873f4696e1f1a500c941a8
2016-08-18 22:55:34 +08:00

110 lines
1.8 KiB
Plaintext

@startuml
title "Karbor API model"
class Protectable {
name: string
instances: []Resource
is_root: bool
}
Protectable --> Resource: lists
class Resource {
id: UUID
type: ResourceType
schema: JSONSchema
dependent_resources: []Resource
}
class Trigger {
}
class TimedTrigger extends Trigger {
}
class EventTrigger extends Trigger {
}
class Checkpoint {
id: UUID
tenant_id: UUID
plan: ProtectionPlan
status: string
started_at: DateTime
}
Checkpoint *-> ProtectionPlan: stores a copy of
class AutomaticOperation {
id: UUID
name: string
description: string
tenant_id: UUID
}
class ScheduledOperation <<abstract>> extends AutomaticOperation {
trigger: Trigger
}
ScheduledOperation *- Trigger: when should the operation should trigger
class BackupPlan extends ScheduledOperation {
protection_plan: ProtectionPlan
}
BackupPlan *--> ProtectionPlan
class DeleteCheckpoints extends ScheduledOperation {
query: string
protection_provider: ProtectionProvider
}
class ProtectionProvider {
name: string
description: string
extended_info_schema: [ResourceType]JSONSchema
}
ProtectionProvider o-> Checkpoint: lists
class ProtectionPlan {
id: UUID
is_enabled: boolean
name: string
status: ePlanStatus
resources: []Resource
protection_provider: ProtectionProvider
parameters: dict
}
ProtectionPlan "1" *--> "N" Resource: aggregates
ProtectionPlan -> ProtectionProvider
ProtectionPlan -> ePlanStatus
enum ePlanStatus {
started
suspended
}
class RestoreTarget {
keystone_uri: URI
}
class Restore {
id: UUID
project_id: UUID
target: RestoreTarget
provider: ProtectionProvider
checkpoint: Checkpoint
started_at: string
}
Restore *-> RestoreTarget: restores to
@enduml