private void validateMinPaths(StorageSystem system,ExportPathParams pathParams,Map<Initiator,List<StoragePort>> existingAssignments,Map<Initiator,List<StoragePort>> assignments,List<Initiator> newInitiators){
  Map<URI,Set<Initiator>> existingInitiatorsMap=generateNetworkToInitiatorsMap(existingAssignments,_dbClient);
  Map<Initiator,List<StoragePort>> allAssignments=new HashMap<Initiator,List<StoragePort>>();
  allAssignments.putAll(existingAssignments);
  allAssignments.putAll(assignments);
  Collection<Initiator> allInitiators=new HashSet<Initiator>(newInitiators);
  for (  Set<Initiator> existingInitiators : existingInitiatorsMap.values()) {
    allInitiators.addAll(existingInitiators);
  }
  Map<URI,List<Initiator>> hostInitiatorsMap=DefaultStoragePortsAssigner.makeHostInitiatorsMap(allInitiators);
  validateMinPaths(pathParams,hostInitiatorsMap,allAssignments);
  if (needToValidateHA(system)) {
    validateHACapabilities(pathParams,allAssignments);
  }
}

private void validateMinPaths ( StorageSystem system , ExportPathParams pathParams , Map < Initiator , List < StoragePort > > existingAssignments , Map < Initiator , List < StoragePort > > assignments , List < Initiator > newInitiators ) { Map < URI , Set < Initiator > > existingInitiatorsMap = generateNetworkToInitiatorsMap ( existingAssignments , _dbClient ) ; Map < Initiator , List < StoragePort > > allAssignments = new HashMap < Initiator , List < StoragePort > > ( ) ; allAssignments . putAll ( existingAssignments ) ; allAssignments . putAll ( assignments ) ; Collection < Initiator > allInitiators = new HashSet < Initiator > ( newInitiators ) ; for ( Set < Initiator > existingInitiators : existingInitiatorsMap . values ( ) ) { allInitiators . addAll ( existingInitiators ) ; } Map < URI , List < Initiator > > hostInitiatorsMap = DefaultStoragePortsAssigner . makeHostInitiatorsMap ( allInitiators ) ; validateMinPaths ( pathParams , hostInitiatorsMap , allAssignments ) ; if ( needToValidateHA ( system ) ) { validateHACapabilities ( pathParams , allAssignments ) ; } }
this function performs checks to ensure the minimum path requirement is met for the export . if this call is for adding additional paths , the validation is across existing and new assignments .
