diff --git a/models/resources/compute/compute.go b/models/resources/compute/compute.go index d487524..5eb1405 100644 --- a/models/resources/compute/compute.go +++ b/models/resources/compute/compute.go @@ -8,12 +8,37 @@ import ( "cloud.o-forge.io/core/oc-lib/tools" ) +type TechnologyEnum int +const( + DOCKER TechnologyEnum = iota + KUBERNETES, + SLURM, + HW, + CONDOR +) + +type AccessEnum int +const( + SSH AccessEnum = iota + SSH_KUBE_API, + SSH_SLURM, + SSH_DOCKER, + OPENCLOUD, + VPN +) + /* * ComputeResource is a struct that represents a compute resource * it defines the resource compute */ type ComputeResource struct { resource_model.AbstractResource + Technology TechnologyEnum `json:"technology,omitempty" bson:"technology,omitempty"` // Technology is the technology + Architecture string `json:"architecture,omitempty" bson:"architecture,omitempty"` // Architecture is the architecture + Access AccessEnum `json:"access,omitempty" bson:"access,omitempty"` // Access is the access + + Localisation string `json:"localisation,omitempty" bson:"localisation,omitempty"` // Localisation is the localisation + CPUs []*CPU `bson:"cpus,omitempty" json:"cpus,omitempty"` // CPUs is the list of CPUs RAM *RAM `bson:"ram,omitempty" json:"ram,omitempty"` // RAM is the RAM GPUs []*GPU `bson:"gpus,omitempty" json:"gpus,omitempty"` // GPUs is the list of GPUs diff --git a/models/resources/storage/storage.go b/models/resources/storage/storage.go index 2e97c36..b173c58 100644 --- a/models/resources/storage/storage.go +++ b/models/resources/storage/storage.go @@ -29,15 +29,15 @@ func (dma StorageType) ToArgo() string { } // enum of a data type -type StorageType string +type StorageType int const ( - FILE = "file" - STREAM = "stream" - API = "api" - DATABASE = "database" - S3 = "s3" - MEMORY = "memory" - HARDWARE = "hardware" + FILE = iota + STREAM + API + DATABASE + S3 + MEMORY + HARDWARE ) /*