forked from uncloud/uncloud
VMs now properly set their pricing
This commit is contained in:
parent
c835c874d5
commit
99a18232aa
2 changed files with 11 additions and 11 deletions
|
|
@ -69,7 +69,7 @@ class VMProduct(Product):
|
|||
cores = models.IntegerField()
|
||||
ram_in_gb = models.FloatField()
|
||||
|
||||
# Default recurring price is PER_MONTH, see uncloud_pay.models.Product.
|
||||
|
||||
@property
|
||||
def recurring_price(self):
|
||||
return self.cores * 3 + self.ram_in_gb * 4
|
||||
|
|
@ -79,6 +79,7 @@ class VMProduct(Product):
|
|||
self.name,
|
||||
self.cores,
|
||||
self.ram_in_gb)
|
||||
|
||||
@property
|
||||
def description(self):
|
||||
return "Virtual machine '{}': {} core(s), {}GB memory".format(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue