mirror of
https://github.com/retspen/webvirtcloud
synced 2025-01-12 08:25:18 +00:00
instance resize check_user_quota correct cpu/memory resize amount. only differrence from current state should be provided for the function
This commit is contained in:
parent
bc0552e12e
commit
1e84dcbbc9
1 changed files with 1 additions and 1 deletions
|
@ -397,7 +397,7 @@ def instance(request, compute_id, vname):
|
||||||
if input_disk_size > disk['size']+(64<<20):
|
if input_disk_size > disk['size']+(64<<20):
|
||||||
disk['size_new'] = input_disk_size
|
disk['size_new'] = input_disk_size
|
||||||
disks_new.append(disk)
|
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:
|
if not request.user.is_superuser and quota_msg:
|
||||||
msg = _("User %s quota reached, cannot resize '%s'!" % (quota_msg, instance.name))
|
msg = _("User %s quota reached, cannot resize '%s'!" % (quota_msg, instance.name))
|
||||||
error_messages.append(msg)
|
error_messages.append(msg)
|
||||||
|
|
Loading…
Reference in a new issue