import org.onap.policy.controlloop.policy.PolicyResult;
import org.onap.policy.drools.system.PolicyEngine;
import org.onap.policy.guard.Util;
-import org.onap.policy.so.SOResponse;
import org.onap.policy.so.SOResponseWrapper;
import org.onap.policy.vfc.VFCResponse;
import org.slf4j.Logger;
//
Integer operationAttempt = null;
try {
- operationAttempt = Integer.parseInt(appcResponse.CommonHeader.SubRequestID);
+ operationAttempt = Integer.parseInt(appcResponse.getCommonHeader().getSubRequestID());
} catch (NumberFormatException e) {
//
// We cannot tell what happened if this doesn't exist
//
// Sanity check the response message
//
- if (appcResponse.Status == null) {
+ if (appcResponse.getStatus() == null) {
//
// We cannot tell what happened if this doesn't exist
//
//
// Get the Response Code
//
- ResponseCode code = ResponseCode.toResponseCode(appcResponse.Status.Code);
+ ResponseCode code = ResponseCode.toResponseCode(appcResponse.getStatus().getCode());
if (code == null) {
//
// We are unaware of this code
//
// We'll consider these two codes as exceptions
//
- this.completeOperation(operationAttempt, appcResponse.getStatus().Description, PolicyResult.FAILURE_EXCEPTION);
+ this.completeOperation(operationAttempt, appcResponse.getStatus().getDescription(), PolicyResult.FAILURE_EXCEPTION);
if (this.policyResult != null && this.policyResult.equals(PolicyResult.FAILURE_TIMEOUT)) {
return null;
}
//
//
//
- this.completeOperation(operationAttempt, appcResponse.getStatus().Description, PolicyResult.SUCCESS);
+ this.completeOperation(operationAttempt, appcResponse.getStatus().getDescription(), PolicyResult.SUCCESS);
if (this.policyResult != null && this.policyResult.equals(PolicyResult.FAILURE_TIMEOUT)) {
return null;
}
//
//
//
- this.completeOperation(operationAttempt, appcResponse.getStatus().Description, PolicyResult.FAILURE);
+ this.completeOperation(operationAttempt, appcResponse.getStatus().getDescription(), PolicyResult.FAILURE);
if (this.policyResult != null && this.policyResult.equals(PolicyResult.FAILURE_TIMEOUT)) {
return null;
}