boolean verifyHostExports(Set<String> initiatorNetworkIds,Set<String> storagePortNativeIds,HostExportInfo hostExportInfo){
  if (initiatorNetworkIds == null || storagePortNativeIds == null) {
    return false;
  }
  boolean isValid=true;
  Set<String> initiatorNetworkIdsSet=new HashSet<>();
  Set<String> targetNativeIdsSet=new HashSet<>();
  List<Initiator> initiatorsList=hostExportInfo.getInitiators();
  List<StoragePort> targetsList=hostExportInfo.getTargets();
  for (  Initiator initiator : initiatorsList) {
    initiatorNetworkIdsSet.add(initiator.getPort());
  }
  for (  StoragePort port : targetsList) {
    targetNativeIdsSet.add(port.getNativeId());
  }
  if (!initiatorNetworkIds.equals(initiatorNetworkIdsSet) || !storagePortNativeIds.equals(targetNativeIdsSet)) {
    isValid=false;
  }
  return isValid;
}

boolean verifyHostExports ( Set < String > initiatorNetworkIds , Set < String > storagePortNativeIds , HostExportInfo hostExportInfo ) { if ( initiatorNetworkIds == null || storagePortNativeIds == null ) { return false ; } boolean isValid = true ; Set < String > initiatorNetworkIdsSet = new HashSet < > ( ) ; Set < String > targetNativeIdsSet = new HashSet < > ( ) ; List < Initiator > initiatorsList = hostExportInfo . getInitiators ( ) ; List < StoragePort > targetsList = hostExportInfo . getTargets ( ) ; for ( Initiator initiator : initiatorsList ) { initiatorNetworkIdsSet . add ( initiator . getPort ( ) ) ; } for ( StoragePort port : targetsList ) { targetNativeIdsSet . add ( port . getNativeId ( ) ) ; } if ( ! initiatorNetworkIds . equals ( initiatorNetworkIdsSet ) || ! storagePortNativeIds . equals ( targetNativeIdsSet ) ) { isValid = false ; } return isValid ; }
validates that hostexportinfo has the same set of initiators and storage ports as provided input arguments .
