mirror of https://github.com/apache/cloudstack.git
bug 12571: fixed error message in createSnapshotPolicy
status 12571: resolved fixed
This commit is contained in:
parent
8bcf30da85
commit
79e9e292dd
|
|
@ -1107,7 +1107,12 @@ public class SnapshotManagerImpl implements SnapshotManager, SnapshotService, Ma
|
|||
long domainLimit = _resourceLimitMgr.findCorrectResourceLimitForDomain(_domainMgr.getDomain(owner.getDomainId()), ResourceType.snapshot);
|
||||
int max = cmd.getMaxSnaps().intValue();
|
||||
if (owner.getType() != Account.ACCOUNT_TYPE_ADMIN && ((accountLimit != -1 && max > accountLimit) || (domainLimit != -1 && max > domainLimit))) {
|
||||
throw new InvalidParameterValueException("Max number of snapshots shouldn't exceed the domain/account level snapshot limit");
|
||||
String message = "domain/account";
|
||||
if (owner.getType() == Account.ACCOUNT_TYPE_PROJECT) {
|
||||
message = "domain/project";
|
||||
}
|
||||
|
||||
throw new InvalidParameterValueException("Max number of snapshots shouldn't exceed the " + message + " level snapshot limit");
|
||||
}
|
||||
|
||||
SnapshotPolicyVO policy = _snapshotPolicyDao.findOneByVolumeInterval(volumeId, intvType);
|
||||
|
|
|
|||
Loading…
Reference in New Issue