oc-lib/workflow.go

26 lines
733 B
Go
Raw Normal View History

2024-07-16 10:56:36 +02:00
package oclib
2024-07-17 17:17:37 +02:00
type Workflow struct {
AbstractResource `json:"abstract_resource" required:"true"`
Datas map[string]Data `json:"datas,omitempty"`
Storages map[string]Storage `json:"storages,omitempty"`
Processing map[string]Processing `json:"processing,omitempty"`
Datacenters map[string]Datacenter `json:"datacenters,omitempty"`
Links map[string]Link `json:"links,omitempty"`
2024-07-16 10:56:36 +02:00
2024-07-17 17:17:37 +02:00
Schedule WorkflowSchedule `json:"schedule,omitempty"`
2024-07-16 10:56:36 +02:00
}
func (w *Workflow) isDCLink(link Link) bool {
if _, exists := w.Datacenters[link.Destination]; exists {
return true
} else if _, exists := w.Datacenters[link.Source]; exists {
return true
}
return false
}