question: private Set < String > returnRemotePoolsAssociatedWithRemoteCopySettings ( Map < String , List < String > > remoteCopySettings , Set < String > poolUris ) { Set < String > remotePoolUris = new HashSet < String > ( ) ; for ( Entry < String , List < String > > entry : remoteCopySettings . entrySet ( ) ) { VirtualPool vPool = _objectCache . queryObject ( VirtualPool . class , URI . create ( entry . getKey ( ) ) ) ; if ( null == vPool ) { remotePoolUris . addAll ( poolUris ) ; } else if ( null != vPool . getUseMatchedPools ( ) && vPool . getUseMatchedPools ( ) ) { if ( null != vPool . getMatchedStoragePools ( ) ) { remotePoolUris . addAll ( vPool . getMatchedStoragePools ( ) ) ; } } else if ( null != vPool . getAssignedStoragePools ( ) ) { remotePoolUris . addAll ( vPool . getAssignedStoragePools ( ) ) ; } } return remotePoolUris ; }
target:  Choose Pools based on remote VPool's matched or assigned Pools