summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy24
1 files changed, 24 insertions, 0 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy
index 69c1c9f8ac..0e6cb64751 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy
@@ -547,6 +547,30 @@ class OofUtils {
return response.toString()
}
+ public String buildSelectNSSTRequest(String requestId,String messageType, Map<String, Object> profileInfo) {
+ def transactionId = requestId
+ logger.debug( "transactionId is: " + transactionId)
+ String correlator = requestId
+ String callbackUrl = UrnPropertiesReader.getVariable("mso.adapters.oof.callback.endpoint") + "/" + messageType + "/" + correlator
+ ObjectMapper objectMapper = new ObjectMapper()
+ String json = objectMapper.writeValueAsString(profileInfo)
+ StringBuilder response = new StringBuilder()
+ response.append(
+ "{\n" +
+ " \"requestInfo\": {\n" +
+ " \"transactionId\": \"${transactionId}\",\n" +
+ " \"requestId\": \"${requestId}\",\n" +
+ " \"sourceId\": \"so\",\n" +
+ " \"timeout\": 600,\n" +
+ " \"callbackUrl\": \"${callbackUrl}\"\n" +
+ " },\n")
+ response.append(" \"SliceProfile\":")
+ response.append(json)
+ response.append("\n}\n")
+ return response.toString()
+ }
+
+
public String buildSelectNSIRequest(String requestId, String nstInfo,String messageType, Map<String, Object> profileInfo){
def transactionId = requestId