@@ -2122,35 +2122,6 @@ protected DeleteSnapshotBackupAnswer execute(
21222122 return new DeleteSnapshotBackupAnswer (cmd , true , null );
21232123 }
21242124
2125- protected Answer execute (DeleteSnapshotsDirCommand cmd ) {
2126- Long dcId = cmd .getDcId ();
2127- Long accountId = cmd .getAccountId ();
2128- Long volumeId = cmd .getVolumeId ();
2129- KVMStoragePool secondaryStoragePool = null ;
2130- try {
2131- secondaryStoragePool = _storagePoolMgr .getStoragePoolByURI (cmd
2132- .getSecondaryStorageUrl ());
2133-
2134- String ssPmountPath = secondaryStoragePool .getLocalPath ();
2135- String snapshotDestPath = ssPmountPath + File .separator
2136- + "snapshots" + File .separator + dcId + File .separator
2137- + accountId + File .separator + volumeId ;
2138-
2139- final Script command = new Script (_manageSnapshotPath ,
2140- _cmdsTimeout , s_logger );
2141- command .add ("-d" , snapshotDestPath );
2142- command .add ("-f" );
2143- command .execute ();
2144- } catch (CloudRuntimeException e ) {
2145- return new Answer (cmd , false , e .toString ());
2146- } finally {
2147- if (secondaryStoragePool != null ) {
2148- _storagePoolMgr .deleteStoragePool (secondaryStoragePool .getType (),secondaryStoragePool .getUuid ());
2149- }
2150-
2151- }
2152- return new Answer (cmd , true , null );
2153- }
21542125
21552126 protected CreateVolumeFromSnapshotAnswer execute (
21562127 final CreateVolumeFromSnapshotCommand cmd ) {
0 commit comments