Make VM order-able again
This commit is contained in:
parent
df059fb00d
commit
d794b24c86
5 changed files with 70 additions and 34 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
|
||||
|
|
@ -99,7 +99,7 @@ class VMProduct(Product):
|
|||
|
||||
|
||||
class VMWithOSProduct(VMProduct):
|
||||
pass
|
||||
primary_disk = models.ForeignKey('VMDiskProduct', on_delete=models.CASCADE, null=True)
|
||||
|
||||
|
||||
class VMDiskImageProduct(UncloudModel):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue