CS-15429: Create Instance should fail if creating instance results in exceeding volume resource limit for domain-admin or user accounts

Reviewed-by: devdeep.singh@citrix.com
Change: Adding a check for diskOfferingId
This commit is contained in:
Deepti Dohare 2012-07-05 11:00:19 +05:30
parent aeee0f6d33
commit 09d9bacce4
1 changed files with 1 additions and 1 deletions

View File

@ -2234,7 +2234,7 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
// check if account/domain is with in resource limits to create a new vm
_resourceLimitMgr.checkResourceLimit(owner, ResourceType.user_vm);
_resourceLimitMgr.checkResourceLimit(owner, ResourceType.volume);
_resourceLimitMgr.checkResourceLimit(owner, ResourceType.volume, (diskOfferingId == null ? 1 : 2));
//verify security group ids
if (securityGroupIdList != null) {