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 c6448d0e8e
commit 7d6db010ac
1 changed files with 1 additions and 1 deletions

View File

@ -2243,7 +2243,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) {