public static void matchVirtualPoolWithAllStoragePools(VirtualPool vpool,DbClient dbClient,CoordinatorClient coordinator,StringBuffer errorMessage){
  List<URI> storagePoolURIs=dbClient.queryByType(StoragePool.class,true);
  Iterator<StoragePool> storagePoolList=dbClient.queryIterativeObjects(StoragePool.class,storagePoolURIs);
  List<StoragePool> allPoolsToProcess=new ArrayList<StoragePool>();
  while (storagePoolList.hasNext()) {
    allPoolsToProcess.add(storagePoolList.next());
  }
  if (!allPoolsToProcess.isEmpty()) {
    matchvPoolWithStoragePools(vpool,allPoolsToProcess,dbClient,coordinator,null,errorMessage);
  }
}

public static void matchVirtualPoolWithAllStoragePools ( VirtualPool vpool , DbClient dbClient , CoordinatorClient coordinator , StringBuffer errorMessage ) { List < URI > storagePoolURIs = dbClient . queryByType ( StoragePool . class , true ) ; Iterator < StoragePool > storagePoolList = dbClient . queryIterativeObjects ( StoragePool . class , storagePoolURIs ) ; List < StoragePool > allPoolsToProcess = new ArrayList < StoragePool > ( ) ; while ( storagePoolList . hasNext ( ) ) { allPoolsToProcess . add ( storagePoolList . next ( ) ) ; } if ( ! allPoolsToProcess . isEmpty ( ) ) { matchvPoolWithStoragePools ( vpool , allPoolsToProcess , dbClient , coordinator , null , errorMessage ) ; } }
matches given vpoollist with all systems present in db . this will be invoked during virtualpool create / update .
