update import plantUML
This commit is contained in:
@@ -8,6 +8,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"
|
||||
)
|
||||
|
||||
type ProcessingUsage struct {
|
||||
@@ -47,6 +48,39 @@ type ProcessingInstance struct {
|
||||
Access *ProcessingResourceAccess `json:"access,omitempty" bson:"access,omitempty"` // Access is the access
|
||||
}
|
||||
|
||||
func NewProcessingInstance(name string, peerID string) ResourceInstanceITF {
|
||||
return &ProcessingInstance{
|
||||
ResourceInstance: ResourceInstance[*ResourcePartnerShip[*ProcessingResourcePricingProfile]]{
|
||||
AbstractObject: utils.AbstractObject{
|
||||
UUID: uuid.New().String(),
|
||||
Name: name,
|
||||
},
|
||||
Partnerships: []*ResourcePartnerShip[*ProcessingResourcePricingProfile]{
|
||||
{
|
||||
Namespace: "default",
|
||||
PeerGroups: map[string][]string{
|
||||
peerID: {"*"},
|
||||
},
|
||||
PricingProfiles: map[int]map[int]*ProcessingResourcePricingProfile{
|
||||
0: {
|
||||
0: &ProcessingResourcePricingProfile{
|
||||
AccessPricingProfile: pricing.AccessPricingProfile[pricing.TimePricingStrategy]{
|
||||
Pricing: pricing.PricingStrategy[pricing.TimePricingStrategy]{
|
||||
Price: 0,
|
||||
Currency: "EUR",
|
||||
TimePricingStrategy: pricing.ONCE,
|
||||
BuyingStrategy: pricing.PERMANENT,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
type PricedProcessingResource struct {
|
||||
PricedResource
|
||||
IsService bool
|
||||
|
||||
Reference in New Issue
Block a user