oc-lib/workflow.go
2024-07-17 17:17:37 +02:00

26 lines
733 B
Go

package oclib
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"`
Schedule WorkflowSchedule `json:"schedule,omitempty"`
}
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
}