This commit is contained in:
mr
2024-11-08 11:44:23 +01:00
parent f3df1e42b9
commit 7fd44a55cb
2 changed files with 24 additions and 12 deletions

View File

@@ -18,6 +18,10 @@ const (
CONDOR
)
func (t TechnologyEnum) String() string {
return [...]string{"DOCKER", "KUBERNETES", "SLURM", "HW", "CONDOR"}[t]
}
type AccessEnum int
const (
@@ -29,15 +33,19 @@ const (
VPN
)
func (a AccessEnum) String() string {
return [...]string{"SSH", "SSH_KUBE_API", "SSH_SLURM", "SSH_DOCKER", "OPENCLOUD", "VPN"}[a]
}
/*
* 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
Technology TechnologyEnum `json:"technology" bson:"technology" default:"0"` // 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
Access AccessEnum `json:"access" bson:"access default:"0"` // Access is the access
Localisation string `json:"localisation,omitempty" bson:"localisation,omitempty"` // Localisation is the localisation