debug
This commit is contained in:
parent
2d249f38ff
commit
e6ca520a88
@ -9,21 +9,23 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type TechnologyEnum int
|
type TechnologyEnum int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
DOCKER TechnologyEnum = iota
|
DOCKER TechnologyEnum = iota
|
||||||
KUBERNETES,
|
KUBERNETES
|
||||||
SLURM,
|
SLURM
|
||||||
HW,
|
HW
|
||||||
CONDOR
|
CONDOR
|
||||||
)
|
)
|
||||||
|
|
||||||
type AccessEnum int
|
type AccessEnum int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
SSH AccessEnum = iota
|
SSH AccessEnum = iota
|
||||||
SSH_KUBE_API,
|
SSH_KUBE_API
|
||||||
SSH_SLURM,
|
SSH_SLURM
|
||||||
SSH_DOCKER,
|
SSH_DOCKER
|
||||||
OPENCLOUD,
|
OPENCLOUD
|
||||||
VPN
|
VPN
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ func (dca *computeMongoAccessor) StoreOne(data utils.DBObject) (utils.DBObject,
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (dca *computeMongoAccessor) CopyOne(data utils.DBObject) (utils.DBObject, int, error) {
|
func (dca *computeMongoAccessor) CopyOne(data utils.DBObject) (utils.DBObject, int, error) {
|
||||||
return dca.computeMongoAccessor(data, dca)
|
return dca.GenericStoreOne(data, dca)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (dca *computeMongoAccessor) LoadOne(id string) (utils.DBObject, int, error) {
|
func (dca *computeMongoAccessor) LoadOne(id string) (utils.DBObject, int, error) {
|
||||||
|
@ -12,7 +12,7 @@ import (
|
|||||||
func TestStoreOneData(t *testing.T) {
|
func TestStoreOneData(t *testing.T) {
|
||||||
d := DataResource{
|
d := DataResource{
|
||||||
WebResource: resource_model.WebResource{
|
WebResource: resource_model.WebResource{
|
||||||
Type: "jpeg", Protocol: "http", Path: "azerty.fr",
|
Protocol: "http", Path: "azerty.fr",
|
||||||
},
|
},
|
||||||
Example: "123456",
|
Example: "123456",
|
||||||
AbstractResource: resource_model.AbstractResource{
|
AbstractResource: resource_model.AbstractResource{
|
||||||
@ -34,7 +34,7 @@ func TestStoreOneData(t *testing.T) {
|
|||||||
func TestLoadOneDate(t *testing.T) {
|
func TestLoadOneDate(t *testing.T) {
|
||||||
d := DataResource{
|
d := DataResource{
|
||||||
WebResource: resource_model.WebResource{
|
WebResource: resource_model.WebResource{
|
||||||
Type: "jpeg", Protocol: "http", Path: "azerty.fr",
|
Protocol: "http", Path: "azerty.fr",
|
||||||
},
|
},
|
||||||
Example: "123456",
|
Example: "123456",
|
||||||
AbstractResource: resource_model.AbstractResource{
|
AbstractResource: resource_model.AbstractResource{
|
||||||
|
@ -8,11 +8,11 @@ import (
|
|||||||
"cloud.o-forge.io/core/oc-lib/tools"
|
"cloud.o-forge.io/core/oc-lib/tools"
|
||||||
)
|
)
|
||||||
|
|
||||||
type StorageType int
|
type StorageSize int
|
||||||
|
|
||||||
// StorageType - Enum that defines the type of storage
|
// StorageType - Enum that defines the type of storage
|
||||||
const (
|
const (
|
||||||
GB StorageType = iota
|
GB StorageSize = iota
|
||||||
MB
|
MB
|
||||||
KB
|
KB
|
||||||
)
|
)
|
||||||
@ -30,6 +30,7 @@ func (dma StorageType) ToArgo() string {
|
|||||||
|
|
||||||
// enum of a data type
|
// enum of a data type
|
||||||
type StorageType int
|
type StorageType int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
FILE = iota
|
FILE = iota
|
||||||
STREAM
|
STREAM
|
||||||
@ -47,9 +48,9 @@ const (
|
|||||||
type StorageResource struct {
|
type StorageResource struct {
|
||||||
resource_model.AbstractResource // AbstractResource contains the basic fields of an object (id, name)
|
resource_model.AbstractResource // AbstractResource contains the basic fields of an object (id, name)
|
||||||
resource_model.WebResource
|
resource_model.WebResource
|
||||||
Type DataType `bson:"type,omitempty" json:"type,omitempty"` // Type is the type of the storage
|
Type StorageType `bson:"type,omitempty" json:"type,omitempty"` // Type is the type of the storage
|
||||||
Acronym string `bson:"acronym,omitempty" json:"acronym,omitempty"` // Acronym is the acronym of the storage
|
Acronym string `bson:"acronym,omitempty" json:"acronym,omitempty"` // Acronym is the acronym of the storage
|
||||||
SizeType StorageType `bson:"size_type" json:"size_type" default:"0"` // SizeType is the type of the storage size
|
SizeType StorageSize `bson:"size_type" json:"size_type" default:"0"` // SizeType is the type of the storage size
|
||||||
Size uint `bson:"size,omitempty" json:"size,omitempty"` // Size is the size of the storage
|
Size uint `bson:"size,omitempty" json:"size,omitempty"` // Size is the size of the storage
|
||||||
Local bool `bson:"local" json:"local"` // Local is a flag that indicates if the storage is local
|
Local bool `bson:"local" json:"local"` // Local is a flag that indicates if the storage is local
|
||||||
Encryption bool `bson:"encryption,omitempty" json:"encryption,omitempty"` // Encryption is a flag that indicates if the storage is encrypted
|
Encryption bool `bson:"encryption,omitempty" json:"encryption,omitempty"` // Encryption is a flag that indicates if the storage is encrypted
|
||||||
|
Loading…
Reference in New Issue
Block a user