rebrand oc-datacenter in oc-compute

This commit is contained in:
mr 2024-11-07 11:36:31 +01:00
parent 4a17d0c07d
commit 2d249f38ff
2 changed files with 33 additions and 8 deletions

View File

@ -8,12 +8,37 @@ import (
"cloud.o-forge.io/core/oc-lib/tools" "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 * ComputeResource is a struct that represents a compute resource
* it defines the resource compute * it defines the resource compute
*/ */
type ComputeResource struct { type ComputeResource struct {
resource_model.AbstractResource 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 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 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 GPUs []*GPU `bson:"gpus,omitempty" json:"gpus,omitempty"` // GPUs is the list of GPUs

View File

@ -29,15 +29,15 @@ func (dma StorageType) ToArgo() string {
} }
// enum of a data type // enum of a data type
type StorageType string type StorageType int
const ( const (
FILE = "file" FILE = iota
STREAM = "stream" STREAM
API = "api" API
DATABASE = "database" DATABASE
S3 = "s3" S3
MEMORY = "memory" MEMORY
HARDWARE = "hardware" HARDWARE
) )
/* /*