Search in sources :

Example 6 with XtremIOTag

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

the class XtremIOV1Client method getInitiatorGroupFolder.

private XtremIOTag getInitiatorGroupFolder(String initiatorGroupFolderName, String clusterName) throws Exception {
    try {
        String uriStr = XtremIOConstants.XTREMIO_INITIATOR_GROUPS_FOLDER_STR.concat(XtremIOConstants.getInputNameString(initiatorGroupFolderName));
        ClientResponse response = get(URI.create(uriStr));
        XtremIOTags folderResponse = getResponseObject(XtremIOTags.class, response);
        XtremIOTag folder = folderResponse.getContent();
        log.info(folder.toString());
        return folder;
    } catch (Exception e) {
        if (null != e.getMessage() && !e.getMessage().contains(XtremIOConstants.OBJECT_NOT_FOUND)) {
            throw e;
        } else {
            log.warn("Initiator group folder {} not found on cluster {}", initiatorGroupFolderName, clusterName);
        }
    }
    log.info("Initiator Group Folder not available on Array with name : {}", initiatorGroupFolderName);
    return null;
}
Also used : ClientResponse(com.sun.jersey.api.client.ClientResponse) XtremIOTag(com.emc.storageos.xtremio.restapi.model.response.XtremIOTag) XtremIOTags(com.emc.storageos.xtremio.restapi.model.response.XtremIOTags) XtremIOApiException(com.emc.storageos.xtremio.restapi.errorhandling.XtremIOApiException)

Aggregations

XtremIOApiException (com.emc.storageos.xtremio.restapi.errorhandling.XtremIOApiException)6 XtremIOTag (com.emc.storageos.xtremio.restapi.model.response.XtremIOTag)6 DeviceControllerException (com.emc.storageos.exceptions.DeviceControllerException)3 XtremIOTags (com.emc.storageos.xtremio.restapi.model.response.XtremIOTags)2 ClientResponse (com.sun.jersey.api.client.ClientResponse)2 ContainmentConstraint (com.emc.storageos.db.client.constraint.ContainmentConstraint)1 BlockConsistencyGroup (com.emc.storageos.db.client.model.BlockConsistencyGroup)1 Project (com.emc.storageos.db.client.model.Project)1 StringSet (com.emc.storageos.db.client.model.StringSet)1 ServiceError (com.emc.storageos.svcs.errorhandling.model.ServiceError)1 XtremIOClient (com.emc.storageos.xtremio.restapi.XtremIOClient)1 URI (java.net.URI)1