bug 6354: return correct interval

status 6354: resolved fixed
This commit is contained in:
anthony 2010-09-29 16:09:06 -07:00
parent 76fbb6edf7
commit 9b03017a07

View File

@ -8376,7 +8376,11 @@ public class ManagementServerImpl implements ManagementServer {
@Override
public String getSnapshotIntervalTypes(long snapshotId){
String intervalTypes = "";
List<SnapshotPolicyVO> policies = _snapMgr.listPoliciesforSnapshot(snapshotId);
SnapshotVO snapshot = _snapshotDao.findById(snapshotId);
if(snapshot.getSnapshotType() == Snapshot.SnapshotType.MANUAL.ordinal() ) {
return "MANUAL";
}
List<SnapshotPolicyVO> policies = _snapMgr.listPoliciesforVolume(snapshot.getVolumeId());
for (SnapshotPolicyVO policy : policies){
if(!intervalTypes.isEmpty()){
intervalTypes += ",";