adding inputs output struct based on argo naming for now
This commit is contained in:
parent
db85d1a48b
commit
bf1d4a4001
@ -5,6 +5,7 @@ import (
|
||||
"time"
|
||||
|
||||
"cloud.o-forge.io/core/oc-lib/models/common/enum"
|
||||
"cloud.o-forge.io/core/oc-lib/models/common/models"
|
||||
"cloud.o-forge.io/core/oc-lib/models/common/pricing"
|
||||
"cloud.o-forge.io/core/oc-lib/models/utils"
|
||||
"cloud.o-forge.io/core/oc-lib/tools"
|
||||
@ -52,8 +53,22 @@ type StorageResourceInstance struct {
|
||||
Throughput string `bson:"throughput,omitempty" json:"throughput,omitempty"` // Throughput is the throughput of the storage
|
||||
}
|
||||
|
||||
func (i *StorageResourceInstance) GetID() string {
|
||||
return i.UUID
|
||||
func (ri *StorageResourceInstance) StoreDraftDefault() {
|
||||
found := false
|
||||
for _, p := range ri.ResourceInstance.Outputs {
|
||||
if p.Attr == "source" {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
ri.ResourceInstance.Outputs = append(ri.ResourceInstance.Outputs, models.Param{
|
||||
Attr: "source",
|
||||
Value: ri.Source,
|
||||
Readonly: true,
|
||||
})
|
||||
}
|
||||
ri.ResourceInstance.StoreDraftDefault()
|
||||
}
|
||||
|
||||
type StorageResourcePartnership struct {
|
||||
|
Loading…
Reference in New Issue
Block a user