Search in sources :

Example 1 with Response

use of com.emc.nas.vnxfile.xmlapi.Response in project coprhd-controller by CoprHD.

the class VNXFileProcessor method getQueryResponse.

/**
 * Fetches the Query response from ResponsePacket.
 *
 * @param responsePacket
 * @return
 */
protected List<Object> getQueryResponse(ResponsePacket responsePacket) {
    List<Object> responseList = responsePacket.getResponseOrResponseEx();
    Iterator<Object> responseListItr = responseList.iterator();
    List<Object> queryResponse = new ArrayList<Object>();
    while (responseListItr.hasNext()) {
        Response response = (Response) responseListItr.next();
        queryResponse.addAll(response.getQueryResponseChoice());
    }
    return queryResponse;
}
Also used : Response(com.emc.nas.vnxfile.xmlapi.Response) ArrayList(java.util.ArrayList)

Example 2 with Response

use of com.emc.nas.vnxfile.xmlapi.Response in project coprhd-controller by CoprHD.

the class VNXFileProcessor method getQueryStatsResponse.

/**
 * Fetches the QueryStats response from ResponsePacket.
 *
 * @param responsePacket
 * @return
 */
protected List<Object> getQueryStatsResponse(ResponsePacket responsePacket) {
    List<Object> responseList = responsePacket.getResponseOrResponseEx();
    Iterator<Object> responseListItr = responseList.iterator();
    List<Object> queryResponse = new ArrayList<Object>();
    while (responseListItr.hasNext()) {
        Response response = (Response) responseListItr.next();
        queryResponse.addAll(response.getQueryStatsResponseChoice());
    }
    return queryResponse;
}
Also used : Response(com.emc.nas.vnxfile.xmlapi.Response) ArrayList(java.util.ArrayList)

Example 3 with Response

use of com.emc.nas.vnxfile.xmlapi.Response in project coprhd-controller by CoprHD.

the class VNXFileProcessor method getTaskResponse.

protected List<Object> getTaskResponse(ResponsePacket responsePacket) {
    List<Object> responseList = responsePacket.getResponseOrResponseEx();
    Iterator<Object> responseListItr = responseList.iterator();
    List<Object> taskResponse = new ArrayList<Object>();
    while (responseListItr.hasNext()) {
        Response response = (Response) responseListItr.next();
        if (null != response.getFault()) {
            Status status = response.getFault();
            List<Problem> problems = status.getProblem();
            Iterator<Problem> problemsItr = problems.iterator();
            while (problemsItr.hasNext()) {
                Problem prob = problemsItr.next();
                _logger.error("Respone fault: {}  cause: {}", prob.getDescription(), prob.getDiagnostics());
            }
        }
        taskResponse.add(response.getTaskResponse());
    }
    return taskResponse;
}
Also used : Response(com.emc.nas.vnxfile.xmlapi.Response) Status(com.emc.nas.vnxfile.xmlapi.Status) ArrayList(java.util.ArrayList) Problem(com.emc.nas.vnxfile.xmlapi.Status.Problem)

Aggregations

Response (com.emc.nas.vnxfile.xmlapi.Response)3 ArrayList (java.util.ArrayList)3 Status (com.emc.nas.vnxfile.xmlapi.Status)1 Problem (com.emc.nas.vnxfile.xmlapi.Status.Problem)1