draft of compute units catalog
This commit is contained in:
parent
1c751f7253
commit
0d6c329477
@ -13,8 +13,22 @@ import (
|
|||||||
* ComputeUnits is a struct that represents a compute units in your datacenters
|
* ComputeUnits is a struct that represents a compute units in your datacenters
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
type ComputeUnitsCerts struct {
|
||||||
|
Host string `json:"host,omitempty" bson:"host,omitempty"`
|
||||||
|
Port string `json:"port,omitempty" bson:"port,omitempty"`
|
||||||
|
|
||||||
|
// for now only Kubernetes
|
||||||
|
CAData string `json:"ca_data,omitempty" bson:"ca_data,omitempty"`
|
||||||
|
CertData string `json:"cert_data,omitempty" bson:"cert_data,omitempty"`
|
||||||
|
KeyData string `json:"key_data,omitempty" bson:"key_data,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO in the future multiple type of certs depending of infra type
|
||||||
|
|
||||||
type ComputeUnits struct {
|
type ComputeUnits struct {
|
||||||
utils.AbstractObject
|
utils.AbstractObject
|
||||||
|
Certs ComputeUnitsCerts `json:"certs,omitempty" bson:"certs,omitempty"`
|
||||||
|
|
||||||
MonitorPath string `json:"monitor_path,omitempty" bson:"monitor_path,omitempty"`
|
MonitorPath string `json:"monitor_path,omitempty" bson:"monitor_path,omitempty"`
|
||||||
Location resources.GeoPoint `json:"location,omitempty" bson:"location,omitempty"`
|
Location resources.GeoPoint `json:"location,omitempty" bson:"location,omitempty"`
|
||||||
Country countries.CountryCode `json:"country,omitempty" bson:"country,omitempty"`
|
Country countries.CountryCode `json:"country,omitempty" bson:"country,omitempty"`
|
||||||
@ -28,7 +42,7 @@ type ComputeUnits struct {
|
|||||||
CPUs map[string]*models.CPU `bson:"cpus,omitempty" json:"cpus,omitempty"` // CPUs is the list of CPUs key is model
|
CPUs map[string]*models.CPU `bson:"cpus,omitempty" json:"cpus,omitempty"` // CPUs is the list of CPUs key is model
|
||||||
GPUs map[string]*models.GPU `bson:"gpus,omitempty" json:"gpus,omitempty"` // GPUs is the list of GPUs key is model
|
GPUs map[string]*models.GPU `bson:"gpus,omitempty" json:"gpus,omitempty"` // GPUs is the list of GPUs key is model
|
||||||
Nodes []*resources.ComputeNode `json:"nodes,omitempty" bson:"nodes,omitempty"`
|
Nodes []*resources.ComputeNode `json:"nodes,omitempty" bson:"nodes,omitempty"`
|
||||||
ResourceID string `json:"-" bson:"-"`
|
ResourceID string `json:"resource_id" bson:"resource_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *ComputeUnits) StoreDraftDefault() {
|
func (r *ComputeUnits) StoreDraftDefault() {
|
||||||
|
Loading…
Reference in New Issue
Block a user