diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManager.java b/server/src/com/cloud/storage/snapshot/SnapshotManager.java index 2ba9b8fcf91..7f8a7b67500 100755 --- a/server/src/com/cloud/storage/snapshot/SnapshotManager.java +++ b/server/src/com/cloud/storage/snapshot/SnapshotManager.java @@ -90,7 +90,7 @@ public interface SnapshotManager extends Manager { * @param policyIds The list of policyIds to which this snapshot belongs to * @param backedUp If true, the snapshot has been successfully created. */ - void postCreateSnapshot(long volumeId, long snapshotId, long policyId, boolean backedUp); + void postCreateSnapshot(Long volumeId, Long snapshotId, Long policyId, boolean backedUp); /** * Destroys the specified snapshot from secondary storage @@ -115,7 +115,7 @@ public interface SnapshotManager extends Manager { /** * Deletes snapshot scheduling policy. Delete will fail if this policy is assigned to one or more volumes */ - boolean deletePolicy(long userId, long policyId); + boolean deletePolicy(long userId, Long policyId); /** * Lists all snapshots for the volume which are created using schedule of the specified policy diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java index f8cfeb23559..3eed1ee7401 100755 --- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java +++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java @@ -528,7 +528,7 @@ public class SnapshotManagerImpl implements SnapshotManager { @Override @DB - public void postCreateSnapshot(long volumeId, long snapshotId, long policyId, boolean backedUp) { + public void postCreateSnapshot(Long volumeId, Long snapshotId, Long policyId, boolean backedUp) { Long userId = getSnapshotUserId(); // Update the snapshot_policy_ref table with the created snapshot // Get the list of policies for this snapshot @@ -918,7 +918,7 @@ public class SnapshotManagerImpl implements SnapshotManager { } @Override - public boolean deletePolicy(long userId, long policyId) { + public boolean deletePolicy(long userId, Long policyId) { SnapshotPolicyVO snapshotPolicy = _snapshotPolicyDao.findById(policyId); VolumeVO volume = _volsDao.findById(snapshotPolicy.getVolumeId()); _snapSchedMgr.removeSchedule(snapshotPolicy.getVolumeId(), snapshotPolicy.getId()); @@ -1122,7 +1122,7 @@ public class SnapshotManagerImpl implements SnapshotManager { throw new InvalidParameterValueException("Invalid Policy id given: " + Snapshot.MANUAL_POLICY_ID); } - for (long pId : policyIds) { + for (Long pId : policyIds) { if (!deletePolicy(userId, pId)) { success = false; s_logger.warn("Failed to delete snapshot policy with Id: " + policyId);