From ec7a2a3c3aad73c449656d792c226e8ada362957 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 5 Mar 2020 14:00:14 +0100 Subject: [PATCH] Correct pricing for VMProduct --- uncloud/uncloud_vm/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uncloud/uncloud_vm/models.py b/uncloud/uncloud_vm/models.py index 7612d86..c0acee2 100644 --- a/uncloud/uncloud_vm/models.py +++ b/uncloud/uncloud_vm/models.py @@ -62,9 +62,9 @@ class VMProduct(Product): def recurring_price(self, recurring_period=RecurringPeriod.PER_MONTH): # TODO: move magic numbers in variables 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: - 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: raise Exception('Invalid recurring period for VM Product pricing.')