From 1e84dcbbc9d30d321ed1a9af0322b3d7cb599f5b Mon Sep 17 00:00:00 2001 From: Jan Krcmar Date: Wed, 23 Mar 2016 14:11:23 +0100 Subject: [PATCH] instance resize check_user_quota correct cpu/memory resize amount. only differrence from current state should be provided for the function --- instances/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instances/views.py b/instances/views.py index 4f2bdf9..4942c5f 100644 --- a/instances/views.py +++ b/instances/views.py @@ -397,7 +397,7 @@ def instance(request, compute_id, vname): if input_disk_size > disk['size']+(64<<20): disk['size_new'] = input_disk_size disks_new.append(disk) - quota_msg = check_user_quota(0, vcpu, memory) + quota_msg = check_user_quota(0, int(vcpu)-conn.get_vcpu(), int(memory)-conn.get_memory()) if not request.user.is_superuser and quota_msg: msg = _("User %s quota reached, cannot resize '%s'!" % (quota_msg, instance.name)) error_messages.append(msg)