mirror of https://github.com/apache/cloudstack.git
VM Import: Use datastore name when datastore path is not set to search for pools on DB (#8759)
This commit is contained in:
parent
0208e094ce
commit
f25d35c5d6
|
|
@ -551,7 +551,8 @@ public class UnmanagedVMsManagerImpl implements UnmanagedVMsManager {
|
|||
List<StoragePoolVO> pools = primaryDataStoreDao.listPoolsByCluster(cluster.getId());
|
||||
pools.addAll(primaryDataStoreDao.listByDataCenterId(zone.getId()));
|
||||
for (StoragePool pool : pools) {
|
||||
if (StringUtils.contains(pool.getPath(), dsPath)) {
|
||||
String searchPoolParam = StringUtils.isNotBlank(dsPath) ? dsPath : dsName;
|
||||
if (StringUtils.contains(pool.getPath(), searchPoolParam)) {
|
||||
storagePool = pool;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue