public static void runUpdatePortAssociationsProcess(Collection<StoragePort> ports,Collection<StoragePort> remPorts,DbClient dbClient,CoordinatorClient coordinator,List<StoragePool> pools){
  try {
    if (null == pools) {
      pools=new ArrayList<StoragePool>();
    }
    if (null == ports) {
      ports=new ArrayList<StoragePort>();
    }
    if (null != remPorts) {
      ports.addAll(remPorts);
    }
    Map<NetworkLite,List<StoragePort>> portsByNetwork=groupPortsByNetwork(ports,dbClient);
    if (!portsByNetwork.isEmpty()) {
      updatePortAssociations(ports,portsByNetwork,dbClient);
      Set<URI> poolUris=getStoragePoolIds(pools);
      List<StoragePool> modifiedPools=StoragePoolAssociationHelper.getStoragePoolsFromPorts(dbClient,ports,remPorts);
      for (      StoragePool pool : modifiedPools) {
        if (!poolUris.contains(pool.getId())) {
          pools.add(pool);
        }
      }
    }
    StringBuffer errorMessage=new StringBuffer();
    ImplicitPoolMatcher.matchModifiedStoragePoolsWithAllVirtualPool(pools,dbClient,coordinator,errorMessage);
    HashSet<URI> systemsToProcess=StoragePoolAssociationHelper.getStorageSytemsFromPorts(ports,remPorts);
    ConnectivityUtil.updateRpSystemsConnectivity(systemsToProcess,dbClient);
  }
 catch (  Exception e) {
    _log.error("Update Port Association process failed",e);
  }
}

public static void runUpdatePortAssociationsProcess ( Collection < StoragePort > ports , Collection < StoragePort > remPorts , DbClient dbClient , CoordinatorClient coordinator , List < StoragePool > pools ) { try { if ( null == pools ) { pools = new ArrayList < StoragePool > ( ) ; } if ( null == ports ) { ports = new ArrayList < StoragePort > ( ) ; } if ( null != remPorts ) { ports . addAll ( remPorts ) ; } Map < NetworkLite , List < StoragePort > > portsByNetwork = groupPortsByNetwork ( ports , dbClient ) ; if ( ! portsByNetwork . isEmpty ( ) ) { updatePortAssociations ( ports , portsByNetwork , dbClient ) ; Set < URI > poolUris = getStoragePoolIds ( pools ) ; List < StoragePool > modifiedPools = StoragePoolAssociationHelper . getStoragePoolsFromPorts ( dbClient , ports , remPorts ) ; for ( StoragePool pool : modifiedPools ) { if ( ! poolUris . contains ( pool . getId ( ) ) ) { pools . add ( pool ) ; } } } StringBuffer errorMessage = new StringBuffer ( ) ; ImplicitPoolMatcher . matchModifiedStoragePoolsWithAllVirtualPool ( pools , dbClient , coordinator , errorMessage ) ; HashSet < URI > systemsToProcess = StoragePoolAssociationHelper . getStorageSytemsFromPorts ( ports , remPorts ) ; ConnectivityUtil . updateRpSystemsConnectivity ( systemsToProcess , dbClient ) ; } catch ( Exception e ) { _log . error ( "Update Port Association process failed" , e ) ; } }
this method is responsible for 1 . update pools to virtual arrays & system to virtual arrays in vplex case 2 . run implicit pool matcher 3 . run rp connectivity process
