mirror of
				https://github.com/retspen/webvirtcloud
				synced 2025-07-31 12:41:08 +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): | ||||
|                         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) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue