@Override public boolean makeSureInstallPathNotUsed(StorageTrashSpec spec) { if (spec.getResourceType().equals(VolumeVO.class.getSimpleName())) { return makeSureInstallPathNotUsedByVolume(spec.getInstallPath()); } else if (spec.getResourceType().equals(ImageVO.class.getSimpleName())) { return makeSureInstallPathNotUsedByImage(spec.getInstallPath()); } else if (spec.getResourceType().equals(VolumeSnapshotVO.class.getSimpleName())) { return makeSureInstallPathNotUsedBySnapshot(spec.getInstallPath()); } return true; } }
StorageTrashSpec spec = t.getValue(); if (!trash.makeSureInstallPathNotUsed(spec)) { logger.warn(String.format("%s is still in using by %s, only remove it from trash...", spec.getInstallPath(), spec.getResourceType())); trash.removeFromDb(spec.getTrashId()); coml.done();
logger.warn(String.format("%s is still in using by %s, only remove it from trash...", spec.getInstallPath(), spec.getResourceType())); trash.removeFromDb(spec.getTrashId()); coml.done();
logger.warn(String.format("%s is still in using by %s, only remove it from trash...", spec.getInstallPath(), spec.getResourceType())); trash.removeFromDb(spec.getTrashId()); coml.done();
@Override public JsonLabelInventory createTrash(TrashType type, StorageTrashSpec spec) { if (spec.getStorageUuid() == null || spec.getResourceUuid() == null) { throw new OperationFailureException(inerr("both resourceUuid and storageUuid must be set for createTrash")); } if (spec.getResourceType() == null) { spec.setResourceType(getResourceType(spec.getResourceUuid())); } if (spec.getStorageType() == null) { spec.setStorageType(getResourceType(spec.getStorageUuid())); } spec.setTrashType(type.toString()); return new JsonLabel().create(makeTrashKey(type), spec, spec.getStorageUuid()); }
logger.warn(String.format("%s is still in using by %s, only remove it from trash...", spec.getInstallPath(), spec.getResourceType())); trash.removeFromDb(spec.getTrashId()); completion.success(result);
logger.warn(String.format("%s is still in using by %s, only remove it from trash...", spec.getInstallPath(), spec.getResourceType())); trash.removeFromDb(spec.getTrashId()); completion.success(result);
logger.warn(String.format("%s is still in using by %s, only remove it from trash...", spec.getInstallPath(), spec.getResourceType())); trash.removeFromDb(spec.getTrashId()); completion.success(result);