public List<VolumeRestRep> findVolumesBackingDatastore(HostSystem host,Datastore datastore){
  Set<String> luns=execute(new FindLunsBackingDatastore(host,datastore));
  List<VolumeRestRep> volumes=Lists.newArrayList();
  for (  String lun : luns) {
    VolumeRestRep volume=execute(new GetBlockVolumeByWWN(lun));
    if (volume != null) {
      volumes.add(volume);
    }
  }
  return volumes;
}

public List < VolumeRestRep > findVolumesBackingDatastore ( HostSystem host , Datastore datastore ) { Set < String > luns = execute ( new FindLunsBackingDatastore ( host , datastore ) ) ; List < VolumeRestRep > volumes = Lists . newArrayList ( ) ; for ( String lun : luns ) { VolumeRestRep volume = execute ( new GetBlockVolumeByWWN ( lun ) ) ; if ( volume != null ) { volumes . add ( volume ) ; } } return volumes ; }
finds the volumes backing the datastore .
