diff options
author | Rob Daugherty <rd472p@att.com> | 2018-03-14 02:07:32 -0400 |
---|---|---|
committer | Rob Daugherty <rd472p@att.com> | 2018-03-14 04:08:41 -0400 |
commit | 38f720752af4d4aad8c4e467a288d9048659f688 (patch) | |
tree | e81066a8b5c77272e30fb57a64999573c4db4d86 /adapters/mso-sdnc-adapter/src/main/java | |
parent | aee3d223f92a6f250f43e17558a2dfd576ff7294 (diff) |
AT&T 1712 and 1802 release code
This is code from AT&T's 1712 and 1802 releases.
Change-Id: Ie1e85851e94bc66c4d9514a0226c221939531a04
Issue-ID: SO-425
Signed-off-by: Rob Daugherty <rd472p@att.com>
Diffstat (limited to 'adapters/mso-sdnc-adapter/src/main/java')
2 files changed, 12 insertions, 5 deletions
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java index 69e015ea50..10175d83b5 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java @@ -43,7 +43,6 @@ import org.openecomp.mso.logger.MsoLogger; public class SDNCServiceRequestConnector extends SDNCConnector { private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA); - private static final String YES = "Y"; @Override protected SDNCResponseCommon createResponseFromContent(int statusCode, String statusMessage, String responseContent, TypedRequestTunables rt) { @@ -58,7 +57,7 @@ public class SDNCServiceRequestConnector extends SDNCConnector { @Override protected SDNCErrorCommon createErrorResponse(int statusCode, String errMsg, TypedRequestTunables rt) { - return new SDNCServiceError(rt.getReqId(), String.valueOf(statusCode), errMsg, YES); + return new SDNCServiceError(rt.getReqId(), String.valueOf(statusCode), errMsg, "Y"); } /** @@ -134,10 +133,10 @@ public class SDNCServiceRequestConnector extends SDNCConnector { // ack-final-indicator is optional: default to "Y". if (ackFinalIndicator == null || ackFinalIndicator.trim().isEmpty()) { - ackFinalIndicator = YES; + ackFinalIndicator = "Y"; } - if (!YES.equals(ackFinalIndicator) && !"N".equals(ackFinalIndicator)) { + if (!ackFinalIndicator.equals("Y") && !"N".equals(ackFinalIndicator)) { throw new ParseException("Invalid ack-final-indicator in SDNC response: '" + ackFinalIndicator + "'", 0); } @@ -149,7 +148,7 @@ public class SDNCServiceRequestConnector extends SDNCConnector { // If the response code in the message from SDNC was not 2XX, return SDNCServiceError. - if (!responseCode.matches("2[0-9][0-9]")) { + if (!responseCode.matches("2[0-9][0-9]") && !responseCode.equals("0")) { // Not a 2XX response. Return SDNCServiceError. return new SDNCServiceError(svcRequestId, responseCode, responseMessage, ackFinalIndicator); } diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java index 2c5355f5fb..f3ae6d62f7 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java @@ -138,6 +138,14 @@ public class SDNCServiceRequestTask implements Runnable { Element requestInformation = addChild(root, "request-information"); addTextChild(requestInformation, "request-id", request.getRequestInformation().getRequestId()); + if(request.getRequestInformation().getRequestAction()!= null) { + addTextChild(requestInformation, "request-action", + request.getRequestInformation().getRequestAction()); + } + if(request.getRequestInformation().getRequestSubAction()!= null) { + addTextChild(requestInformation, "request-sub-action", + request.getRequestInformation().getRequestSubAction()); + } addTextChild(requestInformation, "source", request.getRequestInformation().getSource()); addTextChild(requestInformation, "notification-url", request.getRequestInformation().getNotificationUrl()); |