mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-16 03:32:54 -06:00
243ecf3b4f
* Vendor Rancher Go library. * Implement Rancher Provider. Starting implementation taken from https://github.com/platanus/terraform-provider-rancher Commits from jidonoso@gmail.com and raphael.pinson@camptocamp.com
20 lines
383 B
Go
20 lines
383 B
Go
package rancher
|
|
|
|
import "github.com/rancher/go-rancher/client"
|
|
|
|
// GetActiveOrchestration get the name of the active orchestration for a environment
|
|
func GetActiveOrchestration(project *client.Project) string {
|
|
orch := "cattle"
|
|
|
|
switch {
|
|
case project.Swarm:
|
|
orch = "swarm"
|
|
case project.Mesos:
|
|
orch = "mesos"
|
|
case project.Kubernetes:
|
|
orch = "kubernetes"
|
|
}
|
|
|
|
return orch
|
|
}
|