diagrams documentation

This commit is contained in:
pb 2024-07-02 12:24:03 +02:00
parent 4074b7d88c
commit ab9f1359a0
4 changed files with 224 additions and 0 deletions

86
classe_scheduler.puml Normal file
View File

@ -0,0 +1,86 @@
@startuml
namespace main {
class ArgoBuilder << (S,Aquamarine) >> {
- graph Graph
- branches [][]string
+ Workflow Workflow
- createTemplates()
- createDAGstep()
- createVolumes()
- getDependency(current_computing_id string) []string
+ CreateDAG() bool
}
class Container << (S,Aquamarine) >> {
+ Image string
+ Command []string
+ Args []string
+ VolumeMounts []VolumeMount
}
class Dag << (S,Aquamarine) >> {
+ Tasks []Task
}
class Link << (S,Aquamarine) >> {
+ Src string
+ Dst string
}
class Parameter << (S,Aquamarine) >> {
+ Name string
+ Value string
}
class Spec << (S,Aquamarine) >> {
+ Entrypoint string
+ Arguments []Parameter
+ Volumes []VolumeClaimTemplate
+ Templates []Template
}
class Task << (S,Aquamarine) >> {
+ Name string
+ Template string
+ Dependencies []string
+ Arguments <font color=blue>struct</font>{[]Parameter}
}
class Template << (S,Aquamarine) >> {
+ Name string
+ Inputs <font color=blue>struct</font>{[]Parameter}
+ Container Container
+ Dag Dag
}
class VolumeClaimTemplate << (S,Aquamarine) >> {
+ Metadata <font color=blue>struct</font>{string}
+ Spec VolumeSpec
}
class VolumeMount << (S,Aquamarine) >> {
+ Name string
+ MountPath string
}
class VolumeSpec << (S,Aquamarine) >> {
+ AccessModes []string
+ Resources <font color=blue>struct</font>{<font color=blue>struct</font>{string}}
}
class Workflow << (S,Aquamarine) >> {
+ ApiVersion string
+ Kind string
+ Metadata <font color=blue>struct</font>{string}
+ Spec Spec
}
}
@enduml

View File

@ -0,0 +1,32 @@
@startuml
package "main" {
class Graph {
[]DataModel Datas
[]ComputingModel Computings
[]DatacenterModel Datacenters
[]StorageModel Storages
map[string, Link] Links
HttpQuery ws
GetGraphList(apiurl string) (map[string]string, error)
LoadFrom(workspace string) error
GetWorkflowComponents(workflow string)
GetLinks(workflow string)
AddDataModel(id string, user_input gjson.Result, wf_id string) error
AddDatacenterModel(id string, user_input gjson.Result, wf_id string) error
AddComputingModel(id string, user_input gjson.Result, wf_id string) error
AddStorageModel(id string, user_input gjson.Result, wf_id string) error
ExportToArgo(id string) error
getListBranches(end_links map[string]Link, unvisited_links_list map[string]Link, current_branch []string) (list_branches [][]string)
ExportToHelm(id string) error
isDestination(comp_id string, link_id string) bool
isSource(comp_id string, link_id string) bool
getPreviousLink(link_id string, map_link map[string]Link) (previous_id []string)
getComponentName(id string) string
getComponentType(component_id string) string
getComponentByType(compType string, link Link) (ids []string)
}
}

View File

@ -0,0 +1,32 @@
@startuml
package "main" {
class Graph {
[]Link Links
[]DataModel Datas
[]ComputingModel Computings
[]DatacenterModel Datacenters
[]StorageModel Storages
HttpQuery ws
GetGraphList(apiurl string) (map[string]string, error)
LoadFrom(workspace string) error
AddDataModel(id string) error
AddDatacenterModel(id string) error
AddComputingModel(id string) error
AddStorageModel(id string) error
ExportToArgo(id string) error
ExportToHelm(id string) error
}
class Link {
string Src
string Dst
}
class HttpQuery {
Init(apiurl string)
Get(endpoint string) ([]byte, error)
}
}
@enduml

View File

@ -0,0 +1,74 @@
@startuml
class Parameter {
- Name: string
- Value: string
}
class Container {
- Image: string
- Command: string[]
- Args: string[]
}
class VolumeMount {
- Name: string
- MountPath: string
}
class Task {
- Name: string
- Template: string
- Dependencies: string[]
}
class Dag {
- Tasks: Task[]
}
class Template {
- Name: string
- Inputs: struct
}
class VolumeClaimTemplate {
- Metadata: struct
- Spec: VolumeSpec
}
class VolumeSpec {
- AccessModes: string[]
- Resources: struct
}
class ArgoBuilder {
- graph: Graph
- branches: string[][]
- Workflow: Workflow
}
class Workflow {
- ApiVersion: string
- Kind: string
- Metadata: struct
}
class Spec {
- Entrypoint: string
- Arguments: Parameter[]
- Volumes: VolumeClaimTemplate[]
- Templates: Template[]
}
Parameter -- Task
Container -- Template
VolumeMount -- Container
Task -- Dag
Dag -- Template
Template -- Spec
VolumeClaimTemplate -- Spec
VolumeSpec -- VolumeClaimTemplate
Workflow -- ArgoBuilder
Spec -- Workflow
@enduml