use of com.emc.storageos.xtremio.restapi.model.response.XtremIOVolume in project coprhd-controller by CoprHD.
the class XtremIOV2Client method getVolumeDetails.
@Override
public XtremIOVolume getVolumeDetails(String volumeName, String clusterName) throws Exception {
String uriStr = XtremIOConstants.XTREMIO_V2_VOLUMES_STR.concat(XtremIOConstants.getInputNameForClusterString(volumeName, clusterName));
ClientResponse response = get(URI.create(uriStr));
XtremIOVolumes volumesResponse = getResponseObject(XtremIOVolumes.class, response);
XtremIOVolume volume = volumesResponse.getContent();
log.info(volume.toString());
return volume;
}
use of com.emc.storageos.xtremio.restapi.model.response.XtremIOVolume in project coprhd-controller by CoprHD.
the class XtremIOV2Client method getXtremIOVolumes.
@Override
public List<XtremIOVolume> getXtremIOVolumes(String clusterName) throws Exception {
String uriString = XtremIOConstants.XTREMIO_V2_VOLUMES_STR.concat(XtremIOConstants.getInputClusterString(clusterName));
ClientResponse response = get(URI.create(uriString));
XtremIOVolumesInfo volumeLinks = getResponseObject(XtremIOVolumesInfo.class, response);
log.info("Returned Volume Links size : {}", volumeLinks.getVolumeInfo().length);
List<XtremIOVolume> volumeList = getXtremIOVolumesForLinks(Arrays.asList(volumeLinks.getVolumeInfo()), clusterName);
return volumeList;
}
use of com.emc.storageos.xtremio.restapi.model.response.XtremIOVolume in project coprhd-controller by CoprHD.
the class XtremIOV2Client method getXtremIOVolumesForLinks.
@Override
public List<XtremIOVolume> getXtremIOVolumesForLinks(List<XtremIOObjectInfo> volumeLinks, String clusterName) throws Exception {
List<XtremIOVolume> volumeList = new ArrayList<XtremIOVolume>();
for (XtremIOObjectInfo volumeInfo : volumeLinks) {
URI volumeURI = URI.create(URIUtil.getFromPath(volumeInfo.getHref().concat(XtremIOConstants.getInputClusterString(clusterName))));
ClientResponse response = get(volumeURI);
XtremIOVolumes volumes = getResponseObject(XtremIOVolumes.class, response);
log.info("Volume {}", volumes.getContent().getVolInfo().get(1) + "-" + volumes.getContent().getVolInfo().get(2));
volumeList.add(volumes.getContent());
}
return volumeList;
}
use of com.emc.storageos.xtremio.restapi.model.response.XtremIOVolume in project coprhd-controller by CoprHD.
the class XtremIOV1Client method getXtremIOVolumesForLinks.
@Override
public List<XtremIOVolume> getXtremIOVolumesForLinks(List<XtremIOObjectInfo> volumeLinks, String clusterName) throws Exception {
List<XtremIOVolume> volumeList = new ArrayList<XtremIOVolume>();
for (XtremIOObjectInfo volumeInfo : volumeLinks) {
URI volumeURI = URI.create(URIUtil.getFromPath(volumeInfo.getHref()));
ClientResponse response = get(volumeURI);
XtremIOVolumes volumes = getResponseObject(XtremIOVolumes.class, response);
log.info("Volume {}", volumes.getContent().getVolInfo().get(1) + "-" + volumes.getContent().getVolInfo().get(2));
volumeList.add(volumes.getContent());
}
return volumeList;
}
use of com.emc.storageos.xtremio.restapi.model.response.XtremIOVolume in project coprhd-controller by CoprHD.
the class XtremIOV1Client method getVolumeByIndex.
@Override
public XtremIOVolume getVolumeByIndex(String index, String clusterName) throws Exception {
String uriString = XtremIOConstants.XTREMIO_VOLUMES_STR.concat(XtremIOConstants.SLASH).concat(index);
ClientResponse response = get(URI.create(uriString));
XtremIOVolumes volumesResponse = getResponseObject(XtremIOVolumes.class, response);
XtremIOVolume volume = volumesResponse.getContent();
log.info(volume.toString());
return volume;
}
Aggregations