A question refers to the comment ! And if not Ooopsy
This commit is contained in:
@@ -8,11 +8,15 @@ import (
|
||||
"cloud.o-forge.io/core/oc-lib/tools"
|
||||
)
|
||||
|
||||
/*
|
||||
* DatacenterResource is a struct that represents a datacenter resource
|
||||
* it defines the resource datacenter
|
||||
*/
|
||||
type DatacenterResource struct {
|
||||
resource_model.AbstractResource
|
||||
CPUs []*CPU `bson:"cpus,omitempty" json:"cpus,omitempty"`
|
||||
RAM *RAM `bson:"ram,omitempty" json:"ram,omitempty"`
|
||||
GPUs []*GPU `bson:"gpus,omitempty" json:"gpus,omitempty"`
|
||||
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
|
||||
}
|
||||
|
||||
func (dma *DatacenterResource) Deserialize(j map[string]interface{}) utils.DBObject {
|
||||
@@ -40,6 +44,7 @@ func (d *DatacenterResource) GetAccessor(caller *tools.HTTPCaller) utils.Accesso
|
||||
return data
|
||||
}
|
||||
|
||||
// CPU is a struct that represents a CPU
|
||||
type CPU struct {
|
||||
Cores uint `bson:"cores,omitempty" json:"cores,omitempty"` //TODO: validate
|
||||
Architecture string `bson:"architecture,omitempty" json:"architecture,omitempty"` //TOOD: enum
|
||||
|
||||
Reference in New Issue
Block a user