update import plantUML
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"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"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
/*
|
||||
@@ -54,6 +55,43 @@ type StorageResourceInstance struct {
|
||||
Throughput string `bson:"throughput,omitempty" json:"throughput,omitempty"` // Throughput is the throughput of the storage
|
||||
}
|
||||
|
||||
func NewStorageResourceInstance(name string, peerID string) ResourceInstanceITF {
|
||||
return &StorageResourceInstance{
|
||||
ResourceInstance: ResourceInstance[*StorageResourcePartnership]{
|
||||
AbstractObject: utils.AbstractObject{
|
||||
UUID: uuid.New().String(),
|
||||
Name: name,
|
||||
},
|
||||
Partnerships: []*StorageResourcePartnership{
|
||||
{
|
||||
ResourcePartnerShip: ResourcePartnerShip[*StorageResourcePricingProfile]{
|
||||
Namespace: "default",
|
||||
PeerGroups: map[string][]string{
|
||||
peerID: {"*"},
|
||||
},
|
||||
PricingProfiles: map[int]map[int]*StorageResourcePricingProfile{
|
||||
0: {
|
||||
0: &StorageResourcePricingProfile{
|
||||
ExploitPricingProfile: pricing.ExploitPricingProfile[StorageResourcePricingStrategy]{
|
||||
AccessPricingProfile: pricing.AccessPricingProfile[StorageResourcePricingStrategy]{
|
||||
Pricing: pricing.PricingStrategy[StorageResourcePricingStrategy]{
|
||||
Price: 0,
|
||||
Currency: "EUR",
|
||||
TimePricingStrategy: pricing.ONCE,
|
||||
BuyingStrategy: pricing.PERMANENT,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func (ri *StorageResourceInstance) ClearEnv() {
|
||||
ri.Env = []models.Param{}
|
||||
ri.Inputs = []models.Param{}
|
||||
|
||||
Reference in New Issue
Block a user