use of com.emc.storageos.xtremio.restapi.model.response.XtremIOInitiatorGroups in project coprhd-controller by CoprHD.
the class XtremIOV1Client method getInitiatorGroup.
@Override
public XtremIOInitiatorGroup getInitiatorGroup(String initiatorGroupName, String clusterName) throws Exception {
try {
String uriStr = XtremIOConstants.XTREMIO_INITIATOR_GROUPS_STR.concat(XtremIOConstants.getInputNameString(initiatorGroupName));
ClientResponse response = get(URI.create(uriStr));
XtremIOInitiatorGroups igGroups = getResponseObject(XtremIOInitiatorGroups.class, response);
XtremIOInitiatorGroup igGroup = igGroups.getContent();
log.info(igGroup.toString());
return igGroup;
} catch (Exception e) {
if (null != e.getMessage() && !e.getMessage().contains(XtremIOConstants.OBJECT_NOT_FOUND)) {
throw e;
} else {
log.warn("Initiator group {} not found on cluster {}", initiatorGroupName, clusterName);
}
}
log.info("Initiator Group not registered on Array with name : {}", initiatorGroupName);
return null;
}
use of com.emc.storageos.xtremio.restapi.model.response.XtremIOInitiatorGroups in project coprhd-controller by CoprHD.
the class XtremIOV2Client method getInitiatorGroup.
@Override
public XtremIOInitiatorGroup getInitiatorGroup(String initiatorGroupName, String clusterName) throws Exception {
try {
String uriStr = XtremIOConstants.XTREMIO_V2_INITIATOR_GROUPS_STR.concat(XtremIOConstants.getInputNameForClusterString(initiatorGroupName, clusterName));
ClientResponse response = get(URI.create(uriStr));
XtremIOInitiatorGroups igGroups = getResponseObject(XtremIOInitiatorGroups.class, response);
XtremIOInitiatorGroup igGroup = igGroups.getContent();
log.info(igGroup.toString());
return igGroup;
} catch (Exception e) {
if (null != e.getMessage() && !e.getMessage().contains(XtremIOConstants.OBJECT_NOT_FOUND)) {
throw e;
} else {
log.warn("Initiator group {} not found on cluster {}", initiatorGroupName, clusterName);
}
}
log.info("Initiator Group not registered on Array with name : {}", initiatorGroupName);
return null;
}
Aggregations