use of com.emc.storageos.scaleio.api.restapi.request.ScaleIOVolumeList in project coprhd-controller by CoprHD.
the class ScaleIORestClient method getVolumeNameMap.
/**
* Get the volumes for the given volume Ids
*
* @param volumeIds The list of volume IDs
* @return The map of the ScaleIO volume and volume ID
* @throws Exception
*/
public Map<String, ScaleIOVolume> getVolumeNameMap(List<String> volumeIds) throws Exception {
Map<String, ScaleIOVolume> result = new HashMap<String, ScaleIOVolume>();
ScaleIOVolumeList parm = new ScaleIOVolumeList();
parm.setIds(volumeIds);
ClientResponse response = post(URI.create(ScaleIOConstants.GET_VOLUMES_BYIDS_URI), getJsonForEntity(parm));
List<ScaleIOVolume> volumes = getResponseObjects(ScaleIOVolume.class, response);
for (ScaleIOVolume volume : volumes) {
result.put(volume.getName(), volume);
}
return result;
}
use of com.emc.storageos.scaleio.api.restapi.request.ScaleIOVolumeList in project coprhd-controller by CoprHD.
the class ScaleIORestClient method getVolumes.
/**
* Get the volume names for the given volume Ids
*
* @param volumeIds The list of volume IDs
* @return The map of the volume name and volume ID
* @throws Exception
*/
public Map<String, String> getVolumes(List<String> volumeIds) throws Exception {
Map<String, String> result = new HashMap<String, String>();
ScaleIOVolumeList parm = new ScaleIOVolumeList();
parm.setIds(volumeIds);
ClientResponse response = post(URI.create(ScaleIOConstants.GET_VOLUMES_BYIDS_URI), getJsonForEntity(parm));
List<ScaleIOVolume> volumes = getResponseObjects(ScaleIOVolume.class, response);
for (ScaleIOVolume volume : volumes) {
result.put(volume.getName(), volume.getId());
}
return result;
}
Aggregations