add purchase resource in model catalog
This commit is contained in:
@@ -146,13 +146,13 @@ func (r *PricedComputeResource) GetPrice() (float64, error) {
|
||||
add := r.UsageStart.Add(time.Duration(1 * time.Hour))
|
||||
r.UsageEnd = &add
|
||||
}
|
||||
pricing := *r.SelectedPricing
|
||||
if pricing == nil {
|
||||
if r.SelectedPricing == nil {
|
||||
if len(r.PricingProfiles) == 0 {
|
||||
return 0, errors.New("pricing profile must be set")
|
||||
}
|
||||
pricing = r.PricingProfiles[0]
|
||||
*r.SelectedPricing = r.PricingProfiles[0]
|
||||
}
|
||||
pricing := *r.SelectedPricing
|
||||
price := float64(0)
|
||||
for _, l := range []map[string]float64{r.CPUsLocated, r.GPUsLocated} {
|
||||
for model, amountOfData := range l {
|
||||
|
||||
Reference in New Issue
Block a user