light modification
This commit is contained in:
@@ -71,10 +71,10 @@ type AbstractIntanciatedResource[T ResourceInstanceITF] struct {
|
||||
func (abs *AbstractIntanciatedResource[T]) ConvertToPricedResource(
|
||||
t tools.DataType, request *tools.APIRequest) pricing.PricedItemITF {
|
||||
instances := map[string]string{}
|
||||
profiles := map[string][]pricing.PricingProfileITF{}
|
||||
profiles := []pricing.PricingProfileITF{}
|
||||
for _, instance := range abs.Instances {
|
||||
instances[instance.GetID()] = instance.GetName()
|
||||
profiles[instance.GetID()] = instance.GetPricingsProfiles(request.PeerID, request.Groups)
|
||||
profiles = instance.GetPricingsProfiles(request.PeerID, request.Groups)
|
||||
}
|
||||
return &PricedResource{
|
||||
Name: abs.Name,
|
||||
@@ -175,7 +175,7 @@ func (ri *ResourceInstance[T]) ClearPeerGroups() {
|
||||
type ResourcePartnerShip[T pricing.PricingProfileITF] struct {
|
||||
Namespace string `json:"namespace" bson:"namespace" default:"default-namespace"`
|
||||
PeerGroups map[string][]string `json:"peer_groups,omitempty" bson:"peer_groups,omitempty"`
|
||||
PricingProfiles map[string]T `json:"pricing,omitempty" bson:"pricing,omitempty"`
|
||||
PricingProfiles []T `json:"pricing_profiles,omitempty" bson:"pricing_profiles,omitempty"`
|
||||
}
|
||||
|
||||
func (ri *ResourcePartnerShip[T]) GetPricingsProfiles(peerID string, groups []string) []pricing.PricingProfileITF {
|
||||
|
||||
Reference in New Issue
Block a user