----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/14522/ -----------------------------------------------------------
(Updated Oct. 14, 2013, 10:50 p.m.) Review request for cloudstack, Brian Federle, edison su, John Burwell, and Mike Tutkowski. Changes ------- Revision 2 of this review updates SnapshotResponses to include whether the snapshot can be reverted by asking snapshot strategies whether they can handle the request. The patch also adds the UI logic necessary to show/hide the revert action depending on this field of the SnapshotResponse. Repository: cloudstack-git Description ------- After the last batch of work to the revertSnapshot API, SnapshotServiceImpl was not tied into the workflow to be used by storage providers. I have added the logic in a similar fashion to takeSnapshot(), backupSnapshot() and deleteSnapshot(). I have also added a 'Revert to Snapshot' action to the volume snapshots list in the UI. Diffs (updated) ----- api/src/org/apache/cloudstack/api/ApiConstants.java f85784b api/src/org/apache/cloudstack/api/response/SnapshotResponse.java e9cb109 engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java b124d83 engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotInfo.java 8d6b760 engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotStrategy.java e4cecb6 engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StrategyPriority.java 8bd04f5 engine/api/test/org/apache/cloudstack/engine/subsystem/api/storage/StrategyPriorityTest.java 329b99f engine/storage/integration-test/test/org/apache/cloudstack/storage/test/FakePrimaryDataStoreDriver.java 810afd1 engine/storage/integration-test/test/org/apache/cloudstack/storage/test/SnapshotTest.java 81f77d6 engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java 3f35e1d engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java 6a874d6 plugins/storage/volume/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackPrimaryDataStoreDriverImpl.java 3eaeb1f plugins/storage/volume/sample/src/org/apache/cloudstack/storage/datastore/driver/SamplePrimaryDataStoreDriverImpl.java ece7b26 plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidfirePrimaryDataStoreDriver.java 8046b6c server/src/com/cloud/api/ApiResponseHelper.java f4ca112 server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java dade983 ui/scripts/storage.js b16f4d4 Diff: https://reviews.apache.org/r/14522/diff/ Testing ------- I have tested all of this locally with a custom storage provider. Unfortunately, I'm still in the middle of figuring out how to properly unit test this type of code. If anyone has any recommendations, please let me know. Thanks, Chris Suich