public Map<URI,List<URI>> addSourceVolumeSnapshots(){
  List<URI> blockSnapshots=Lists.newArrayList();
  Map<URI,List<URI>> snapshotsMap=new HashMap<>();
  for (  URI volumeId : uris(volumeIds)) {
    List<URI> snapshots=getSnapshots(volumeId);
    blockSnapshots.addAll(snapshots);
    snapshotsMap.put(volumeId,snapshots);
  }
  if (!blockSnapshots.isEmpty()) {
    BlockStorageUtils.addVolumesToConsistencyGroup(consistencyGroup,blockSnapshots);
  }
  return snapshotsMap;
}

public Map < URI , List < URI > > addSourceVolumeSnapshots ( ) { List < URI > blockSnapshots = Lists . newArrayList ( ) ; Map < URI , List < URI > > snapshotsMap = new HashMap < > ( ) ; for ( URI volumeId : uris ( volumeIds ) ) { List < URI > snapshots = getSnapshots ( volumeId ) ; blockSnapshots . addAll ( snapshots ) ; snapshotsMap . put ( volumeId , snapshots ) ; } if ( ! blockSnapshots . isEmpty ( ) ) { BlockStorageUtils . addVolumesToConsistencyGroup ( consistencyGroup , blockSnapshots ) ; } return snapshotsMap ; }
adds all source volumes ' snapshots to the consistency group
