Search in sources :

Example 1 with XtremIOLunMaps

use of com.emc.storageos.xtremio.restapi.model.response.XtremIOLunMaps in project coprhd-controller by CoprHD.

the class XtremIOV2Client method getXtremIOLunMapsForLinks.

@Override
public List<XtremIOLunMap> getXtremIOLunMapsForLinks(List<XtremIOObjectInfo> lunMapLinks, String clusterName) throws Exception {
    List<XtremIOLunMap> lunMapList = new ArrayList<XtremIOLunMap>();
    for (XtremIOObjectInfo lunMapInfo : lunMapLinks) {
        URI lunMapURI = URI.create(URIUtil.getFromPath(lunMapInfo.getHref().concat(XtremIOConstants.getInputClusterString(clusterName))));
        ClientResponse response = get(lunMapURI);
        XtremIOLunMaps lunMaps = getResponseObject(XtremIOLunMaps.class, response);
        log.info("LunMap {}", lunMaps.getContent().getMappingInfo().get(1) + " - " + lunMaps.getContent().getMappingInfo().get(2));
        lunMapList.add(lunMaps.getContent());
    }
    return lunMapList;
}
Also used : ClientResponse(com.sun.jersey.api.client.ClientResponse) XtremIOLunMaps(com.emc.storageos.xtremio.restapi.model.response.XtremIOLunMaps) XtremIOLunMap(com.emc.storageos.xtremio.restapi.model.response.XtremIOLunMap) ArrayList(java.util.ArrayList) XtremIOObjectInfo(com.emc.storageos.xtremio.restapi.model.response.XtremIOObjectInfo) URI(java.net.URI)

Example 2 with XtremIOLunMaps

use of com.emc.storageos.xtremio.restapi.model.response.XtremIOLunMaps in project coprhd-controller by CoprHD.

the class XtremIOV1Client method getXtremIOLunMapsForLinks.

@Override
public List<XtremIOLunMap> getXtremIOLunMapsForLinks(List<XtremIOObjectInfo> lunMapLinks, String clusterName) throws Exception {
    List<XtremIOLunMap> lunMapList = new ArrayList<XtremIOLunMap>();
    for (XtremIOObjectInfo lunMapInfo : lunMapLinks) {
        URI lunMapURI = URI.create(URIUtil.getFromPath(lunMapInfo.getHref()));
        ClientResponse response = get(lunMapURI);
        XtremIOLunMaps lunMaps = getResponseObject(XtremIOLunMaps.class, response);
        log.debug("LunMap {}", lunMaps.getContent().getMappingInfo().get(1) + " - " + lunMaps.getContent().getMappingInfo().get(2));
        lunMapList.add(lunMaps.getContent());
    }
    return lunMapList;
}
Also used : ClientResponse(com.sun.jersey.api.client.ClientResponse) XtremIOLunMaps(com.emc.storageos.xtremio.restapi.model.response.XtremIOLunMaps) XtremIOLunMap(com.emc.storageos.xtremio.restapi.model.response.XtremIOLunMap) ArrayList(java.util.ArrayList) XtremIOObjectInfo(com.emc.storageos.xtremio.restapi.model.response.XtremIOObjectInfo) URI(java.net.URI)

Aggregations

XtremIOLunMap (com.emc.storageos.xtremio.restapi.model.response.XtremIOLunMap)2 XtremIOLunMaps (com.emc.storageos.xtremio.restapi.model.response.XtremIOLunMaps)2 XtremIOObjectInfo (com.emc.storageos.xtremio.restapi.model.response.XtremIOObjectInfo)2 ClientResponse (com.sun.jersey.api.client.ClientResponse)2 URI (java.net.URI)2 ArrayList (java.util.ArrayList)2