Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import org.apache.cloudstack.storage.command.UploadStatusAnswer;
import org.apache.cloudstack.storage.command.UploadStatusAnswer.UploadStatus;
import org.apache.cloudstack.storage.command.UploadStatusCommand;
import org.apache.cloudstack.storage.to.VolumeObjectTO;

import com.cloud.agent.api.Answer;
import com.cloud.agent.api.AttachIsoCommand;
Expand Down Expand Up @@ -823,12 +822,7 @@ public Answer Delete(DeleteCommand cmd) {
try {
txn.start();
MockVolumeVO template = _mockVolumeDao.findByStoragePathAndType(cmd.getData().getPath());
if (template == null) {
if(!((VolumeObjectTO)cmd.getData()).getName().startsWith("ROOT-")) {
return new Answer(cmd, false, "can't find object to delete:" + cmd.getData()
.getPath());
}
} else {
if (template != null) {
_mockVolumeDao.remove(template.getId());
}
txn.commit();
Expand Down
1 change: 0 additions & 1 deletion test/integration/smoke/test_vm_life_cycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,6 @@ def test_11_destroy_vm_and_volumes(self):
accountid=self.account.name,
domainid=self.account.domainid,
serviceofferingid=self.small_offering.id,
mode=self.services["mode"]
)
vol1 = Volume.create(
self.apiclient,
Expand Down