diff --git a/doc/images/protection-service/class-diagram.png b/doc/images/protection-service/class-diagram.png new file mode 100644 index 00000000..f60692c6 Binary files /dev/null and b/doc/images/protection-service/class-diagram.png differ diff --git a/doc/images/protection-service/protection-architecture.png b/doc/images/protection-service/protection-architecture.png new file mode 100644 index 00000000..851ba8c2 Binary files /dev/null and b/doc/images/protection-service/protection-architecture.png differ diff --git a/doc/source/protection-service/class_diagram.pu b/doc/source/protection-service/class_diagram.pu new file mode 100644 index 00000000..623e33ae --- /dev/null +++ b/doc/source/protection-service/class_diagram.pu @@ -0,0 +1,133 @@ +@startuml + +title ProtectionService Class Diagram + + +class RpcServer { + -endpoints: []Manager_Class + -target: messaging.Target +} + + +class ProtectionManager << (S,#FF7700) Singleton >>{ + +rpc_call_protect(): void { backup_plan} + +rpc_call_restore(): void { checkpoint, restore_target, ...} + +rpc_call_list_plugins(): []Plugin {list_options} + +rpc_call_show_plugin():Plugin {plugin_id} + +rpc_call_list_checkpoints(): []Checkpoints {list_options} + +rpc_call_show_checkpoint(): Checkpoint {provider_id, checkpoint_id} + +rpc_call_delete_checkpoint():void {provider_id, checkpoint_id} + +rpc_call_list_bank_plugins():[]BankPlugins {list_options} + +rpc_call_get_bank_plugin():BankPlugin {bank_plugin_id} + +rpc_call_create_provider(): String {plugins, bank_plugin} + +rpc_call_update_provider():void {provider_id, **kwargs} + +rpc_call_list_providers():[]Providers {list_options} + +rpc_call_delete_provider():void {provider_id} + +rpc_call_get_provider():Provider {provider_id} + -flow_engine: WorkFlow_Engine +} +RpcServer*-right->ProtectionManager:has one as endpoint + + +class ProtectionPlugin << (S,#FF7700) Singleton >>{ + +list_plugins(): []Plugin {list_options} + +show_plugin():Plugin {plugin_id} + -init():void {conf_file} + -plugins:[]Plugin +} + +ProtectionManager*-down->ProtectionPlugins:has a + +class Checkpoints << (S,#FF7700) Singleton >>{ + -checkpoint_serializer: CheckpointSerializer + +list_checkpoints(): []Checkpoints {list_options} + +show_checkpoint(): Checkpoint {provider_id, checkpoint_id} + +delete_checkpoint():void {provider_id, checkpoint_id} + +create_checkpoint(): Checkpoint {plan} + +update_checkpoint(): void {checkpoint, **kwargs} + +update_protection_definition() :void {checkpoint, resource, **kwargs} + +} + +ProtectionManager*-right->Checkpoints:has a + +class GraphFlow { + flow :[] Task +} + +ProtectionManager -up-> GraphFlow:create one flow per rpc_call + +class CreateCheckpointTask extends Task { + -backup_plan:BackupPlan + +create_checkpoint: void {} +} + +GraphFlow "1"*-up->"1" CreateCheckpointTask:has + +class ResourceProtectTask extends Task{ + -protect_resource: Resource + -plugin: ProtectionPlugin + +protect():void {} +} + +GraphFlow "1"*-up->"many" ResourceProtectTask:has + +class CheckpointStatusCheckTask extends Task{ + -checkpoint:Checkpoint + +check(): void {checkpoint} +} + +GraphFlow "1"*-up->"1" CheckpointStatusCheckTask :has + +Class CheckpointSerializer { + +serialize():[]String {encoding_format, checkpoint} + +deserialize():Checkpoint {[]String {encoding_format}} + } + + Checkpoints*-up->CheckpointSerializer:has a + + + +class ProtectionPlugin { + -protectable_type:String + -schema:[]String + +get_protecatble_type(): Protectable_type {} + +get_schema(): []String {enconding_format} + +protect():String {protectable} + +restore():void {checkpoint,target,...} +} + +ProtectionPlugins"1" *-down->"many" ProtectionPlugin:has + +class BankPlugins { + +list_bank_plugins():[]BankPlugins {list_options} + +get_bank_plugin():BankPlugin {bank_plugin_id} + -init(): void {conf_file} + bank_plugins:[]BankPlugin +} + +ProtectionManager*-down->BankPlugins:has a + +class BankPlugin { + -endpoint: URL + +aquire_obj_lock(): void {TBD} + +release_obj_lock(): void {TBD} + +put():void {key, value} + +get():[]String {key} + +delete():void {key} + +list():[] {prefix, delimiter, limits, marker,...} +} + +BankPlugins"1"*-down->"many"BankPlugin:has + +class Providers{ + +create_provider(): String {plugins, bank_plugin} + +update_provider():void {provider_id, **kwargs} + +list_providers():[]Providers {list_options} + +delete_provider():void {provider_id} + +get_provider():Provider {provider_id} +} + +ProtectionManager*-down->Providers:has a + +@enduml \ No newline at end of file