forked from uncloud/uncloud
Correct pricing for VMProduct
This commit is contained in:
parent
cf17373b3f
commit
ec7a2a3c3a
1 changed files with 2 additions and 2 deletions
|
@ -62,9 +62,9 @@ class VMProduct(Product):
|
||||||
def recurring_price(self, recurring_period=RecurringPeriod.PER_MONTH):
|
def recurring_price(self, recurring_period=RecurringPeriod.PER_MONTH):
|
||||||
# TODO: move magic numbers in variables
|
# TODO: move magic numbers in variables
|
||||||
if recurring_period == RecurringPeriod.PER_MONTH:
|
if recurring_period == RecurringPeriod.PER_MONTH:
|
||||||
return self.cores * 3 + self.ram_in_gb * 2
|
return self.cores * 3 + self.ram_in_gb * 4
|
||||||
elif recurring_period == RecurringPeriod.PER_HOUR:
|
elif recurring_period == RecurringPeriod.PER_HOUR:
|
||||||
return self.cores * 4.0/(30 * 24) + self.ram_in_gb * 3.0/(30* 24)
|
return self.cores * 4.0/(30 * 24) + self.ram_in_gb * 4.5/(30* 24)
|
||||||
else:
|
else:
|
||||||
raise Exception('Invalid recurring period for VM Product pricing.')
|
raise Exception('Invalid recurring period for VM Product pricing.')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue