VMs now properly set their pricing

This commit is contained in:
Nico Schottelius 2020-05-02 23:44:20 +02:00
commit 99a18232aa
2 changed files with 11 additions and 11 deletions

View file

@ -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(