proper storage construction (#6797)

This commit is contained in:
dahn 2023-07-19 10:27:20 +02:00 committed by GitHub
parent 73a269e3b3
commit 0aade286f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,7 +113,8 @@ public class KVMStoragePoolManager {
s_logger.warn(String.format("Duplicate StorageAdaptor type %s, not loading %s", info.storagePoolType().toString(), storageAdaptor.getName()));
} else {
try {
this._storageMapper.put(info.storagePoolType().toString(), storageAdaptor.newInstance());
s_logger.info(String.format("adding storage adaptor for %s", storageAdaptor.getName()));
this._storageMapper.put(info.storagePoolType().toString(), storageAdaptor.getDeclaredConstructor().newInstance());
} catch (Exception ex) {
throw new CloudRuntimeException(ex.toString());
}