Skip to content

Commit

Permalink
core: MBS not supporting MoveOrCopy command
Browse files Browse the repository at this point in the history
If User will try to move or copy a disk int to MBS (this operation is not supported yet)
he will get the error 'Cannot copy Virtual Disk. Managed Block Storage is not supported this operation'

Bug-Url: https://bugzilla.redhat.com/2077666
Signed-off-by: Artiom Divak <adivak@redhat.com>
  • Loading branch information
ArtiomDivak committed Jul 17, 2022
1 parent ba24e65 commit 5b3dec2
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ protected boolean validateDestStorage() {
return false;
}

if(getStorageDomain().getStorageType() == StorageType.LOCALFS) {
return failValidation(EngineMessage.ACTION_TYPE_FAILED_UNSUPPORTED_ACTION_FOR_MANAGED_BLOCK_STORAGE_TYPE);
}

if (!isSupportedByManagedBlockStorageDomain(getStorageDomain())) {
return false;
}
Expand Down Expand Up @@ -318,6 +322,11 @@ protected boolean validateSourceStorageDomain() {
}
StorageDomain storageDomain = storageDomainDao.getForStoragePool(sourceDomainId, getImage().getStoragePoolId());
StorageDomainValidator validator = new StorageDomainValidator(storageDomain);

if(storageDomain.getStorageType() == StorageType.LOCALFS) {
return failValidation(EngineMessage.ACTION_TYPE_FAILED_UNSUPPORTED_ACTION_FOR_MANAGED_BLOCK_STORAGE_TYPE);
}

return validate(validator.isDomainExistAndActive()) && isSupportedByManagedBlockStorageDomain(storageDomain);
}

Expand Down

0 comments on commit 5b3dec2

Please sign in to comment.