use of com.emc.storageos.xtremio.restapi.model.response.XtremIOClusters in project coprhd-controller by CoprHD.
the class XtremIOV2Client method getXtremIOSystemInfo.
@Override
public List<XtremIOSystem> getXtremIOSystemInfo() throws Exception {
ClientResponse response = get(XtremIOConstants.XTREMIO_V2_BASE_CLUSTERS_URI);
XtremIOClusters xioClusters = getResponseObject(XtremIOClusters.class, response);
log.info("Returned Clusters : {}", xioClusters.getClusters().length);
List<XtremIOSystem> discoveredXIOSystems = new ArrayList<XtremIOSystem>();
for (XtremIOCluster cluster : xioClusters.getClusters()) {
URI clusterURI = URI.create(URIUtil.getFromPath(cluster.getHref()));
response = get(clusterURI);
XtremIOClusterInfo xioSystem = getResponseObject(XtremIOClusterInfo.class, response);
log.info("System {}", xioSystem.getContent().getName() + "-" + xioSystem.getContent().getSerialNumber() + "-" + xioSystem.getContent().getVersion());
discoveredXIOSystems.add(xioSystem.getContent());
}
return discoveredXIOSystems;
}
use of com.emc.storageos.xtremio.restapi.model.response.XtremIOClusters in project coprhd-controller by CoprHD.
the class XtremIOV2Client method getClusterDetails.
@Override
public XtremIOSystem getClusterDetails(String clusterSerialNumber) throws Exception {
String filterString = String.format(XtremIOConstants.XTREMIO_CLUSTER_FILTER_STR, clusterSerialNumber);
String uriString = XtremIOConstants.XTREMIO_V2_BASE_CLUSTERS_STR.concat(filterString);
ClientResponse response = get(URI.create(uriString));
XtremIOClusters xioClusters = getResponseObject(XtremIOClusters.class, response);
log.info("Returned Clusters : {}", xioClusters.getClusters().length);
for (XtremIOCluster cluster : xioClusters.getClusters()) {
URI clusterURI = URI.create(URIUtil.getFromPath(cluster.getHref()));
log.debug("Trying to get cluster details for {}", clusterURI.toString());
response = get(clusterURI);
XtremIOClusterInfo xioSystem = getResponseObject(XtremIOClusterInfo.class, response);
log.info("System {}", xioSystem.getContent().getName() + "-" + xioSystem.getContent().getSerialNumber() + "-" + xioSystem.getContent().getVersion());
return xioSystem.getContent();
}
return null;
}
use of com.emc.storageos.xtremio.restapi.model.response.XtremIOClusters in project coprhd-controller by CoprHD.
the class XtremIOV1Client method getXtremIOXMSVersion.
@Override
public String getXtremIOXMSVersion() throws Exception {
log.info("no XMS object in version 1. So get the cluster and send back its version info");
ClientResponse response = get(XtremIOConstants.XTREMIO_BASE_CLUSTERS_URI);
XtremIOClusters xioClusters = getResponseObject(XtremIOClusters.class, response);
log.info("Returned Clusters : {}", xioClusters.getClusters().length);
for (XtremIOCluster cluster : xioClusters.getClusters()) {
URI clusterURI = URI.create(URIUtil.getFromPath(cluster.getHref()));
response = get(clusterURI);
XtremIOClusterInfo xioSystem = getResponseObject(XtremIOClusterInfo.class, response);
log.info("System {}", xioSystem.getContent().getName() + "-" + xioSystem.getContent().getSerialNumber() + "-" + xioSystem.getContent().getVersion());
return xioSystem.getContent().getVersion();
}
return null;
}
use of com.emc.storageos.xtremio.restapi.model.response.XtremIOClusters in project coprhd-controller by CoprHD.
the class XtremIOV1Client method getXtremIOSystemInfo.
@Override
public List<XtremIOSystem> getXtremIOSystemInfo() throws Exception {
ClientResponse response = get(XtremIOConstants.XTREMIO_BASE_CLUSTERS_URI);
XtremIOClusters xioClusters = getResponseObject(XtremIOClusters.class, response);
log.info("Returned Clusters : {}", xioClusters.getClusters().length);
List<XtremIOSystem> discoveredXIOSystems = new ArrayList<XtremIOSystem>();
for (XtremIOCluster cluster : xioClusters.getClusters()) {
URI clusterURI = URI.create(URIUtil.getFromPath(cluster.getHref()));
response = get(clusterURI);
XtremIOClusterInfo xioSystem = getResponseObject(XtremIOClusterInfo.class, response);
log.info("System {}", xioSystem.getContent().getName() + "-" + xioSystem.getContent().getSerialNumber() + "-" + xioSystem.getContent().getVersion());
discoveredXIOSystems.add(xioSystem.getContent());
}
return discoveredXIOSystems;
}
Aggregations