diff options
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/test')
15 files changed, 345 insertions, 151 deletions
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java index a513acc952..63e5ccbbf3 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (c) 2019 Samsung + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -27,7 +29,8 @@ import org.camunda.bpm.application.PostDeploy; import org.camunda.bpm.application.PreUndeploy; import org.camunda.bpm.application.ProcessApplicationInfo; import org.camunda.bpm.engine.ProcessEngine; -import org.onap.so.logger.MsoLogger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -49,8 +52,7 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class)}) public class MSOCommonApplication { - private static final MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, - MSOCommonApplication.class); + private static final Logger logger = LoggerFactory.getLogger(MSOCommonApplication.class); @Value("${mso.async.core-pool-size}") private int corePoolSize; @@ -78,20 +80,11 @@ public class MSOCommonApplication { @PostDeploy public void postDeploy(ProcessEngine processEngineInstance) { - long startTime = System.currentTimeMillis(); - - msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, - "Post deployment complete..."); } @PreUndeploy public void cleanup(ProcessEngine processEngine, ProcessApplicationInfo processApplicationInfo, List<ProcessEngine> processEngines) { - long startTime = System.currentTimeMillis(); - - msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, - "Pre Undeploy complete..."); - } @Bean @@ -105,4 +98,4 @@ public class MSOCommonApplication { executor.initialize(); return executor; } -}
\ No newline at end of file +} diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/validation/MyDisabledValidator.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/validation/MyDisabledValidator.java new file mode 100644 index 0000000000..78e4791b1c --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/validation/MyDisabledValidator.java @@ -0,0 +1,44 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.bpmn.common.validation; + +import java.util.Collections; +import java.util.Optional; + +import org.onap.so.bpmn.common.BuildingBlockExecution; +import org.springframework.stereotype.Component; + +@Component +@Skip +public class MyDisabledValidator implements PreBuildingBlockValidator { + + @Override + public boolean shouldRunFor(String bbName) { + + return Collections.singleton("test").contains(bbName); + } + + @Override + public Optional<String> validate(BuildingBlockExecution exeuction) { + return Optional.of("my-disabled-validator"); + } + +} diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/FileUtil.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/FileUtil.java index b6acdf7adb..6a3668b175 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/FileUtil.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/FileUtil.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (c) 2019 Samsung + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -22,7 +24,8 @@ package org.onap.so.bpmn.mock; import java.io.IOException; import java.io.InputStream; -import org.onap.so.logger.MsoLogger; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @@ -35,7 +38,7 @@ import org.onap.so.logger.MsoLogger; */ public class FileUtil { - private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, FileUtil.class); + private static final Logger logger = LoggerFactory.getLogger(FileUtil.class); /** * Read the specified resource file and return the contents as a String. @@ -58,7 +61,7 @@ public class FileUtil { return ""; } } catch (IOException e) { - LOGGER.debug("Exception:", e); + logger.debug("Exception:", e); return ""; } } diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterMockTransformer.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterMockTransformer.java index f129164b4c..11788be76e 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterMockTransformer.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterMockTransformer.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (c) 2019 Samsung + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -24,7 +26,6 @@ import javax.ws.rs.core.UriBuilder; import org.onap.so.client.HttpClient; import org.onap.so.client.HttpClientFactory; -import org.onap.so.logger.MsoLogger; import org.onap.so.utils.TargetEntity; import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder; @@ -33,6 +34,8 @@ import com.github.tomakehurst.wiremock.extension.Parameters; import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer; import com.github.tomakehurst.wiremock.http.Request; import com.github.tomakehurst.wiremock.http.ResponseDefinition; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @@ -41,7 +44,7 @@ import com.github.tomakehurst.wiremock.http.ResponseDefinition; */ public class SDNCAdapterMockTransformer extends ResponseDefinitionTransformer { - private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, SDNCAdapterMockTransformer.class); + private static final Logger logger = LoggerFactory.getLogger(SDNCAdapterMockTransformer.class); private String callbackResponse; private String requestId; @@ -74,7 +77,7 @@ public class SDNCAdapterMockTransformer extends ResponseDefinitionTransformer { String requestId = requestBody.substring(requestBody.indexOf("<sdncadapter:RequestId>")+23, requestBody.indexOf("</sdncadapter:RequestId>")); callbackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName()); - System.out.println("callbackResponse:" + callbackResponse); + logger.info("callbackResponse:" + callbackResponse); if (this.requestId != null) { callbackResponse = callbackResponse.replace(this.requestId, requestId); @@ -90,7 +93,7 @@ public class SDNCAdapterMockTransformer extends ResponseDefinitionTransformer { } //Kick off callback thread - System.out.println("callback Url:" + callbackUrl + ":delay:" + delay); + logger.info("callback Url:" + callbackUrl + ":delay:" + delay); CallbackResponseThread calbackResponseThread = new CallbackResponseThread(callbackUrl,callbackResponse, delay); calbackResponseThread.start(); @@ -128,16 +131,16 @@ public class SDNCAdapterMockTransformer extends ResponseDefinitionTransformer { //Delay sending callback response sleep(delay); } catch (InterruptedException e1) { - LOGGER.debug("Exception :",e1); + logger.debug("Exception :", e1); } - LOGGER.debug("Sending callback response:" + callbackUrl); + logger.debug("Sending callback response:" + callbackUrl); try { HttpClient client = new HttpClientFactory().newTextXmlClient( UriBuilder.fromUri(callbackUrl).build().toURL(), TargetEntity.SDNC_ADAPTER); client.post(payLoad); } catch (Exception e) { - LOGGER.debug("Exception :",e); + logger.debug("Exception :", e); } } diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java index 832caae803..344c3b521d 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (c) 2019 Samsung + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -25,7 +27,6 @@ import javax.ws.rs.core.UriBuilder; import org.onap.so.client.HttpClient; import org.onap.so.client.HttpClientFactory; -import org.onap.so.logger.MsoLogger; import org.onap.so.utils.TargetEntity; import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder; @@ -34,10 +35,12 @@ import com.github.tomakehurst.wiremock.extension.Parameters; import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer; import com.github.tomakehurst.wiremock.http.Request; import com.github.tomakehurst.wiremock.http.ResponseDefinition; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class SDNCAdapterNetworkTopologyMockTransformer extends ResponseDefinitionTransformer { - private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, SDNCAdapterNetworkTopologyMockTransformer.class); + private static final Logger logger = LoggerFactory.getLogger(SDNCAdapterNetworkTopologyMockTransformer.class); private String callbackResponse; private String requestId; @@ -61,22 +64,22 @@ public class SDNCAdapterNetworkTopologyMockTransformer extends ResponseDefinitio String callbackUrl = requestBody.substring(requestBody.indexOf("<sdncadapter:CallbackUrl>")+25, requestBody.indexOf("</sdncadapter:CallbackUrl>")); String requestId = requestBody.substring(requestBody.indexOf("<sdncadapter:RequestId>")+23, requestBody.indexOf("</sdncadapter:RequestId>")); - System.out.println("request callbackUrl : " + callbackUrl); - System.out.println("request requestId : " + requestId); - - System.out.println("file path/name : " + responseDefinition.getBodyFileName()); + logger.info("request callbackUrl : " + callbackUrl); + logger.info("request requestId : " + requestId); + + logger.info("file path/name : " + responseDefinition.getBodyFileName()); callbackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName()); // extract Response responseRequestId String responseRequestId = callbackResponse.substring(callbackResponse.indexOf("<RequestId>")+11, callbackResponse.indexOf("</RequestId>")); - System.out.println("response requestId: " + responseRequestId); - System.out.println("callbackResponse (before): " + callbackResponse); + logger.info("response requestId: " + responseRequestId); + logger.info("callbackResponse (before): " + callbackResponse); callbackResponse = callbackResponse.replace(responseRequestId, requestId); if (this.requestId != null) { callbackResponse = callbackResponse.replace(this.requestId, requestId); } else { callbackResponse = callbackResponse.replace(responseRequestId, requestId); } - System.out.println("callbackResponse (after):" + callbackResponse); + logger.info("callbackResponse (after):" + callbackResponse); Object sdncDelay = MockResource.getMockProperties().get("sdnc_delay"); int delay = 300; @@ -85,7 +88,7 @@ public class SDNCAdapterNetworkTopologyMockTransformer extends ResponseDefinitio } //Kick off callback thread - System.out.println("(NetworkTopologyMockTransformer) callback Url:" + callbackUrl + ":delay:" + delay); + logger.info("(NetworkTopologyMockTransformer) callback Url:" + callbackUrl + ":delay:" + delay); CallbackResponseThread calbackResponseThread = new CallbackResponseThread(callbackUrl,callbackResponse, delay); calbackResponseThread.start(); @@ -119,19 +122,18 @@ public class SDNCAdapterNetworkTopologyMockTransformer extends ResponseDefinitio sleep(delay); } catch (InterruptedException e1) { // TODO Auto-generated catch block - LOGGER.debug("Exception :",e1); + logger.debug("Exception :", e1); } - LOGGER.debug("Sending callback response to url: " + callbackUrl); + logger.debug("Sending callback response to url: {}", callbackUrl); try { - HttpClient client = new HttpClientFactory().newTextXmlClient( - UriBuilder.fromUri(callbackUrl).build().toURL(), - TargetEntity.SDNC_ADAPTER); + HttpClient client = new HttpClientFactory() + .newTextXmlClient(UriBuilder.fromUri(callbackUrl).build().toURL(), TargetEntity.SDNC_ADAPTER); Response response = client.post(payLoad); - LOGGER.debug("Successfully posted callback? Status: " + response.getStatus()); + logger.debug("Successfully posted callback? Status: {}", response.getStatus()); } catch (Exception e) { // TODO Auto-generated catch block - LOGGER.debug("catch error in - request.post() "); - LOGGER.debug("Exception :",e); + logger.debug("catch error in - request.post() "); + logger.debug("Exception :", e); } } diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterCreateMockTransformer.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterCreateMockTransformer.java index 107a70d1d0..362d9508d3 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterCreateMockTransformer.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterCreateMockTransformer.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (c) 2019 Samsung + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -25,7 +27,6 @@ import javax.ws.rs.core.UriBuilder; import org.onap.so.client.HttpClient; import org.onap.so.client.HttpClientFactory; -import org.onap.so.logger.MsoLogger; import org.onap.so.utils.TargetEntity; import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder; @@ -34,6 +35,8 @@ import com.github.tomakehurst.wiremock.extension.Parameters; import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer; import com.github.tomakehurst.wiremock.http.Request; import com.github.tomakehurst.wiremock.http.ResponseDefinition; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Please describe the VnfAdapterCreateMockTransformer.java class @@ -41,7 +44,7 @@ import com.github.tomakehurst.wiremock.http.ResponseDefinition; */ public class VnfAdapterCreateMockTransformer extends ResponseDefinitionTransformer { - private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfAdapterCreateMockTransformer.class); + private static final Logger logger = LoggerFactory.getLogger(VnfAdapterCreateMockTransformer.class); private String notifyCallbackResponse; private String ackResponse; @@ -74,17 +77,17 @@ public class VnfAdapterCreateMockTransformer extends ResponseDefinitionTransform responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>")); updatedResponse = ackResponse.replace(responseMessageId, messageId); } catch (Exception ex) { - LOGGER.debug("Exception :",ex); + logger.debug("Exception :",ex); System.out.println(" ******* Use default response file in '__files/vnfAdapterMocks/vnfCreateSimResponse.xml'"); responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>")); updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId); } - System.out.println("response (mock) messageId : " + responseMessageId); - System.out.println("request (replacement) messageId: " + messageId); + logger.info("response (mock) messageId : {}", responseMessageId); + logger.info("request (replacement) messageId: {}", messageId); - System.out.println("vnf Response (before):" + notifyCallbackResponse); - System.out.println("vnf Response (after):" + updatedResponse); + logger.info("vnf Response (before): {}", notifyCallbackResponse); + logger.info("vnf Response (after): {}", updatedResponse); Object vnfDelay = MockResource.getMockProperties().get("vnf_delay"); int delay = 300; @@ -93,7 +96,7 @@ public class VnfAdapterCreateMockTransformer extends ResponseDefinitionTransform } //Kick off callback thread - System.out.println("VnfAdapterCreateMockTransformer notficationUrl: " + notficationUrl + ":delay: " + delay); + logger.info("VnfAdapterCreateMockTransformer notficationUrl: {} :delay: {}", notficationUrl, delay); CallbackResponseThread callbackResponseThread = new CallbackResponseThread(notficationUrl,updatedResponse, delay); callbackResponseThread.start(); @@ -128,20 +131,19 @@ public class VnfAdapterCreateMockTransformer extends ResponseDefinitionTransform sleep(delay); } catch (InterruptedException e1) { // TODO Auto-generated catch block - LOGGER.debug("Exception :",e1); + logger.debug("Exception :",e1); } - LOGGER.debug("Sending callback response to url: " + callbackUrl); + logger.debug("Sending callback response to url: {}", callbackUrl); try { HttpClient client = new HttpClientFactory().newTextXmlClient( UriBuilder.fromUri(callbackUrl).build().toURL(), TargetEntity.VNF_ADAPTER); Response response = client.post(payLoad); - LOGGER.debug("Successfully posted callback? Status: " + response.getStatus()); - //System.err.println("Successfully posted callback:" + result.getStatus()); + logger.debug("Successfully posted callback? Status: {}", response.getStatus()); } catch (Exception e) { // TODO Auto-generated catch block - LOGGER.debug("catch error in - request.post() "); - LOGGER.debug("Exception :",e); + logger.debug("catch error in - request.post() "); + logger.debug("Exception :", e); } } diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterDeleteMockTransformer.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterDeleteMockTransformer.java index cf0f966414..b67f3dcedd 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterDeleteMockTransformer.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterDeleteMockTransformer.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (c) 2019 Samsung + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -24,7 +26,6 @@ import javax.ws.rs.core.UriBuilder; import org.onap.so.client.HttpClient; import org.onap.so.client.HttpClientFactory; -import org.onap.so.logger.MsoLogger; import org.onap.so.utils.TargetEntity; import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder; @@ -33,6 +34,8 @@ import com.github.tomakehurst.wiremock.extension.Parameters; import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer; import com.github.tomakehurst.wiremock.http.Request; import com.github.tomakehurst.wiremock.http.ResponseDefinition; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Please describe the VnfAdapterCreateMockTransformer.java class @@ -40,7 +43,7 @@ import com.github.tomakehurst.wiremock.http.ResponseDefinition; */ public class VnfAdapterDeleteMockTransformer extends ResponseDefinitionTransformer { - private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfAdapterDeleteMockTransformer.class); + private static final Logger logger = LoggerFactory.getLogger(VnfAdapterDeleteMockTransformer.class); private String notifyCallbackResponse; private String ackResponse; @@ -58,8 +61,6 @@ public class VnfAdapterDeleteMockTransformer extends ResponseDefinitionTransform public ResponseDefinition transform(Request request, ResponseDefinition responseDefinition, FileSource fileSource, Parameters parameters) { - // System.err.println("notifyCallbackResponse:" + notifyCallbackResponse); - String requestBody = request.getBodyAsString(); String notficationUrl = requestBody.substring(requestBody.indexOf("<notificationUrl>")+17, requestBody.indexOf("</notificationUrl>")); @@ -69,23 +70,23 @@ public class VnfAdapterDeleteMockTransformer extends ResponseDefinitionTransform try { // try supplied response file (if any) - System.out.println(" Supplied fileName: " + responseDefinition.getBodyFileName()); + logger.info(" Supplied fileName: {}", responseDefinition.getBodyFileName()); ackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName()); notifyCallbackResponse = ackResponse; responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>")); updatedResponse = ackResponse.replace(responseMessageId, messageId); } catch (Exception ex) { - LOGGER.debug("Exception :",ex); - System.out.println(" ******* Use default response file in '__files/vnfAdapterMocks/vnfDeleteSimResponse.xml'"); + logger.debug("Exception :",ex); + logger.info(" ******* Use default response file in '__files/vnfAdapterMocks/vnfDeleteSimResponse.xml'"); responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>")); updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId); } - System.out.println("response (mock) messageId : " + responseMessageId); - System.out.println("request (replacement) messageId: " + messageId); + logger.info("response (mock) messageId : {}", responseMessageId); + logger.info("request (replacement) messageId: {}", messageId); - System.out.println("vnf Response (before):" + notifyCallbackResponse); - System.out.println("vnf Response (after):" + updatedResponse); + logger.info("vnf Response (before):{}", notifyCallbackResponse); + logger.info("vnf Response (after):{}", updatedResponse); Object vnfDelay = MockResource.getMockProperties().get("vnf_delay"); int delay = 300; @@ -94,7 +95,7 @@ public class VnfAdapterDeleteMockTransformer extends ResponseDefinitionTransform } //Kick off callback thread - System.out.println("VnfAdapterDeleteMockTransformer notficationUrl: " + notficationUrl + ":delay: " + delay); + logger.info("VnfAdapterDeleteMockTransformer notficationUrl: {} :delay: {}", notficationUrl, delay); CallbackResponseThread callbackResponseThread = new CallbackResponseThread(notficationUrl,updatedResponse, delay); callbackResponseThread.start(); @@ -129,7 +130,7 @@ public class VnfAdapterDeleteMockTransformer extends ResponseDefinitionTransform sleep(delay); } catch (InterruptedException e1) { // TODO Auto-generated catch block - LOGGER.debug("Exception :",e1); + logger.debug("Exception :",e1); } try { @@ -139,8 +140,8 @@ public class VnfAdapterDeleteMockTransformer extends ResponseDefinitionTransform client.post(payLoad); } catch (Exception e) { // TODO Auto-generated catch block - System.out.println("catch error in - request.post() "); - LOGGER.debug("Exception :",e); + logger.info("catch error in - request.post() "); + logger.debug("Exception :",e); } } diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterQueryMockTransformer.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterQueryMockTransformer.java index 5eaa4e75b0..48ced35810 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterQueryMockTransformer.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterQueryMockTransformer.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (c) 2019 Samsung + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -25,7 +27,6 @@ import javax.ws.rs.core.UriBuilder; import org.onap.so.client.HttpClient; import org.onap.so.client.HttpClientFactory; -import org.onap.so.logger.MsoLogger; import org.onap.so.utils.TargetEntity; import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder; @@ -34,6 +35,8 @@ import com.github.tomakehurst.wiremock.extension.Parameters; import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer; import com.github.tomakehurst.wiremock.http.Request; import com.github.tomakehurst.wiremock.http.ResponseDefinition; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Please describe the VnfAdapterQueryMockTransformer.java class @@ -43,7 +46,8 @@ import com.github.tomakehurst.wiremock.http.ResponseDefinition; public class VnfAdapterQueryMockTransformer extends ResponseDefinitionTransformer{ - private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfAdapterQueryMockTransformer.class); + private static final Logger logger = LoggerFactory.getLogger(VnfAdapterQueryMockTransformer + .class); private String notifyCallbackResponse; private String ackResponse; @@ -70,36 +74,29 @@ public class VnfAdapterQueryMockTransformer extends ResponseDefinitionTransforme String notficationUrl = requestBody.substring(requestBody.indexOf("<notificationUrl>")+17, requestBody.indexOf("</notificationUrl>")); String messageId = requestBody.substring(requestBody.indexOf("<messageId>")+11, requestBody.indexOf("</messageId>")); - // String updatedResponse = notifyCallbackResponse.replace("b1a82ce6-7f5c-45fd-9273-acaf88fc2137", messageId); - + String responseMessageId = ""; String updatedResponse = ""; - - // if (ackResponse == null) { - //System.err.println("file:" + responseDefinition.getBodyFileName()); - // ackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName()); - //} - try { // try supplied response file (if any) - System.out.println(" Supplied fileName: " + responseDefinition.getBodyFileName()); + logger.info(" Supplied fileName: {}", responseDefinition.getBodyFileName()); ackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName()); notifyCallbackResponse = ackResponse; responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>")); updatedResponse = ackResponse.replace(responseMessageId, messageId); } catch (Exception ex) { - LOGGER.debug("Exception :",ex); - System.out.println(" ******* Use default response file in '__files/vnfAdapterMocks/vnfQuerySimResponse.xml'"); + logger.debug("Exception :",ex); + logger.info(" ******* Use default response file in '__files/vnfAdapterMocks/vnfQuerySimResponse.xml'"); responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>")); updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId); } - - System.out.println("response (mock) messageId : " + responseMessageId); - System.out.println("request (replacement) messageId: " + messageId); - - System.out.println("vnf Response (before):" + notifyCallbackResponse); - System.out.println("vnf Response (after):" + updatedResponse); + + logger.info("response (mock) messageId : {}", responseMessageId); + logger.info("request (replacement) messageId: {}", messageId); + + logger.info("vnf Response (before):{}", notifyCallbackResponse); + logger.info("vnf Response (after):{}", updatedResponse); Object vnfDelay = MockResource.getMockProperties().get("vnf_delay"); @@ -109,12 +106,9 @@ public class VnfAdapterQueryMockTransformer extends ResponseDefinitionTransforme } //Kick off callback thread - - //System.out.println("notficationUrl" + notficationUrl); - //System.out.println("updatedResponse" + updatedResponse); - System.out.println("VnfAdapterQueryMockTransformer notficationUrl: " + notficationUrl + ":delay: " + delay); + logger.info("VnfAdapterQueryMockTransformer notficationUrl: {}:delay: {}", notficationUrl, delay); CallbackResponseThread callbackResponseThread = new CallbackResponseThread(notficationUrl,updatedResponse, delay); - System.out.println("Inside Callback" ); + logger.info("Inside Callback" ); callbackResponseThread.start(); return ResponseDefinitionBuilder @@ -145,7 +139,7 @@ public class VnfAdapterQueryMockTransformer extends ResponseDefinitionTransforme //Delay sending callback response sleep(delay); } catch (InterruptedException e1) { - LOGGER.debug("Exception :",e1); + logger.debug("Exception :",e1); } try { @@ -154,7 +148,7 @@ public class VnfAdapterQueryMockTransformer extends ResponseDefinitionTransforme TargetEntity.VNF_ADAPTER); client.post(payLoad); } catch (Exception e) { - LOGGER.debug("Exception :",e); + logger.debug("Exception :",e); } } diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterRollbackMockTransformer.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterRollbackMockTransformer.java index 06f2fb7d5f..edf05422d1 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterRollbackMockTransformer.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterRollbackMockTransformer.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (c) 2019 Samsung + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -24,7 +26,6 @@ import javax.ws.rs.core.UriBuilder; import org.onap.so.client.HttpClient; import org.onap.so.client.HttpClientFactory; -import org.onap.so.logger.MsoLogger; import org.onap.so.utils.TargetEntity; import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder; @@ -33,6 +34,8 @@ import com.github.tomakehurst.wiremock.extension.Parameters; import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer; import com.github.tomakehurst.wiremock.http.Request; import com.github.tomakehurst.wiremock.http.ResponseDefinition; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Please describe the VnfAdapterCreateMockTransformer.java class @@ -40,7 +43,7 @@ import com.github.tomakehurst.wiremock.http.ResponseDefinition; */ public class VnfAdapterRollbackMockTransformer extends ResponseDefinitionTransformer { - private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfAdapterRollbackMockTransformer.class); + private static final Logger logger = LoggerFactory.getLogger(VnfAdapterRollbackMockTransformer.class); private String notifyCallbackResponse; private String ackResponse; @@ -72,23 +75,23 @@ public class VnfAdapterRollbackMockTransformer extends ResponseDefinitionTransfo try { // try supplied response file (if any) - System.out.println(" Supplied fileName: " + responseDefinition.getBodyFileName()); + logger.info(" Supplied fileName: {}", responseDefinition.getBodyFileName()); ackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName()); notifyCallbackResponse = ackResponse; responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>")); updatedResponse = ackResponse.replace(responseMessageId, messageId); } catch (Exception ex) { - LOGGER.debug("Exception :",ex); - System.out.println(" ******* Use default response file in '__files/vnfAdapterMocks/vnfRollbackSimResponse.xml'"); + logger.debug("Exception :",ex); + logger.info(" ******* Use default response file in '__files/vnfAdapterMocks/vnfRollbackSimResponse.xml'"); responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>")); updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId); } - - System.out.println("response (mock) messageId : " + responseMessageId); - System.out.println("request (replacement) messageId: " + messageId); - - System.out.println("vnf Response (before):" + notifyCallbackResponse); - System.out.println("vnf Response (after):" + updatedResponse); + + logger.info("response (mock) messageId : {}", responseMessageId); + logger.info("request (replacement) messageId: {}", messageId); + + logger.info("vnf Response (before):{}", notifyCallbackResponse); + logger.info("vnf Response (after):{}", updatedResponse); Object vnfDelay = MockResource.getMockProperties().get("vnf_delay"); int delay = 300; @@ -97,7 +100,7 @@ public class VnfAdapterRollbackMockTransformer extends ResponseDefinitionTransfo } //Kick off callback thread - System.out.println("VnfAdapterRollbackMockTransformer notficationUrl: " + notficationUrl + ":delay: " + delay); + logger.info("VnfAdapterRollbackMockTransformer notficationUrl: {} :delay: {}", notficationUrl, delay); CallbackResponseThread callbackResponseThread = new CallbackResponseThread(notficationUrl,updatedResponse, delay); callbackResponseThread.start(); @@ -130,7 +133,7 @@ public class VnfAdapterRollbackMockTransformer extends ResponseDefinitionTransfo //Delay sending callback response sleep(delay); } catch (InterruptedException e1) { - LOGGER.debug("Exception :",e1); + logger.debug("Exception :",e1); } try { @@ -139,8 +142,8 @@ public class VnfAdapterRollbackMockTransformer extends ResponseDefinitionTransfo TargetEntity.VNF_ADAPTER); client.post(payLoad); } catch (Exception e) { - System.out.println("catch error in - request.post() "); - LOGGER.debug("Exception :",e); + logger.info("catch error in - request.post() "); + logger.debug("Exception :", e); } } diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterUpdateMockTransformer.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterUpdateMockTransformer.java index 9e60e87644..5693877574 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterUpdateMockTransformer.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/VnfAdapterUpdateMockTransformer.java @@ -4,6 +4,8 @@ * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ + * Modifications Copyright (c) 2019 Samsung + * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -24,7 +26,6 @@ import javax.ws.rs.core.UriBuilder; import org.onap.so.client.HttpClient; import org.onap.so.client.HttpClientFactory; -import org.onap.so.logger.MsoLogger; import org.onap.so.utils.TargetEntity; import com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder; @@ -33,6 +34,8 @@ import com.github.tomakehurst.wiremock.extension.Parameters; import com.github.tomakehurst.wiremock.extension.ResponseDefinitionTransformer; import com.github.tomakehurst.wiremock.http.Request; import com.github.tomakehurst.wiremock.http.ResponseDefinition; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Please describe the VnfAdapterUpdateMockTransformer.java class @@ -40,7 +43,7 @@ import com.github.tomakehurst.wiremock.http.ResponseDefinition; */ public class VnfAdapterUpdateMockTransformer extends ResponseDefinitionTransformer { - private static final MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.BPEL, VnfAdapterUpdateMockTransformer.class); + private static final Logger logger = LoggerFactory.getLogger(VnfAdapterUpdateMockTransformer.class); private String notifyCallbackResponse; private String requestId; @@ -72,23 +75,23 @@ public class VnfAdapterUpdateMockTransformer extends ResponseDefinitionTransform try { // try supplied response file (if any) - System.out.println(" Supplied fileName: " + responseDefinition.getBodyFileName()); + logger.info(" Supplied fileName: {}", responseDefinition.getBodyFileName()); ackResponse = FileUtil.readResourceFile("__files/" + responseDefinition.getBodyFileName()); notifyCallbackResponse = ackResponse; responseMessageId = ackResponse.substring(ackResponse.indexOf("<messageId>")+11, ackResponse.indexOf("</messageId>")); updatedResponse = ackResponse.replace(responseMessageId, messageId); } catch (Exception ex) { - LOGGER.debug("Exception :",ex); - System.out.println(" ******* Use default response file in 'vnfAdapter/vnfUpdateSimResponse.xml'"); + logger.debug("Exception :",ex); + logger.info(" ******* Use default response file in 'vnfAdapter/vnfUpdateSimResponse.xml'"); responseMessageId = notifyCallbackResponse.substring(notifyCallbackResponse.indexOf("<messageId>")+11, notifyCallbackResponse.indexOf("</messageId>")); updatedResponse = notifyCallbackResponse.replace(responseMessageId, messageId); } - - System.out.println("response (mock) messageId : " + responseMessageId); - System.out.println("request (replacement) messageId: " + messageId); - - System.out.println("vnf Response (before):" + notifyCallbackResponse); - System.out.println("vnf Response (after):" + updatedResponse); + + logger.info("response (mock) messageId : {}", responseMessageId); + logger.info("request (replacement) messageId: {}", messageId); + + logger.info("vnf Response (before):{}", notifyCallbackResponse); + logger.info("vnf Response (after):{}", updatedResponse); Object vnfDelay = MockResource.getMockProperties().get("vnf_delay"); int delay = 300; @@ -97,7 +100,7 @@ public class VnfAdapterUpdateMockTransformer extends ResponseDefinitionTransform } //Kick off callback thread - System.out.println("VnfAdapterUpdateMockTransformer notficationUrl: " + notficationUrl + ":delay: " + delay); + logger.info("VnfAdapterUpdateMockTransformer notficationUrl: {} :delay: {}", notficationUrl, delay); CallbackResponseThread callbackResponseThread = new CallbackResponseThread(notficationUrl,updatedResponse, delay); callbackResponseThread.start(); @@ -130,7 +133,7 @@ public class VnfAdapterUpdateMockTransformer extends ResponseDefinitionTransform //Delay sending callback response sleep(delay); } catch (InterruptedException e1) { - LOGGER.debug("Exception :", e1); + logger.debug("Exception :", e1); } try { @@ -139,8 +142,8 @@ public class VnfAdapterUpdateMockTransformer extends ResponseDefinitionTransform TargetEntity.VNF_ADAPTER); client.post(payLoad); } catch (Exception e) { - System.out.println("catch error in - request.post() "); - LOGGER.debug("Exception :",e); + logger.info("catch error in - request.post() "); + logger.debug("Exception :", e); } } diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java index 7e76e52959..3cb7b241dc 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java @@ -643,14 +643,16 @@ public class BBInputSetupMapperLayerTest { @Test public void testMapNameValueUserParams() throws IOException { RequestDetails requestDetails = mapper.readValue(new File(RESOURCE_PATH + "RequestDetailsInput_mapReqContext.json"), RequestDetails.class); - HashMap<String,String> actual = bbInputSetupMapperLayer.mapNameValueUserParams(requestDetails.getRequestParameters()); + Map<String,Object> actual = bbInputSetupMapperLayer.mapNameValueUserParams(requestDetails.getRequestParameters()); + assertTrue(actual.containsKey("mns_vfw_protected_route_prefixes")); + assertTrue(actual.get("mns_vfw_protected_route_prefixes").toString().contains("interface_route_table_routes_route")); + assertTrue(actual.get("mns_vfw_protected_route_prefixes").toString().contains("1.1.1.1/32")); + assertTrue(actual.get("mns_vfw_protected_route_prefixes").toString().contains("0::1/128")); assertTrue(actual.containsKey("name1")); assertTrue(actual.containsValue("value1")); assertTrue(actual.get("name1").equals("value1")); - assertTrue(actual.containsKey("name2")); - assertTrue(actual.containsValue("value2")); - assertTrue(actual.get("name2").equals("value2")); + assertFalse(actual.containsKey("ignore")); assertFalse(actual.containsValue("ignore")); } diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java index 56875d315b..cea8fc3cc2 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java @@ -776,7 +776,7 @@ public class BBInputSetupTest { @Test public void testPopulateGBBWithSIAndAdditionalInfo() throws Exception { - GeneralBuildingBlock expected = mapper.readValue(new File(RESOURCE_PATH + "GeneralBuildingBlockExpected.json"), + GeneralBuildingBlock expected = mapper.readValue(new File(RESOURCE_PATH + "GeneralBuildingBlockExpectedWUserParamsInfo.json"), GeneralBuildingBlock.class); ExecuteBuildingBlock executeBB = mapper.readValue(new File(RESOURCE_PATH + "ExecuteBuildingBlockSimple.json"), ExecuteBuildingBlock.class); diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GeneralBuildingBlockExpectedWUserParamsInfo.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GeneralBuildingBlockExpectedWUserParamsInfo.json new file mode 100644 index 0000000000..5ac07c6546 --- /dev/null +++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GeneralBuildingBlockExpectedWUserParamsInfo.json @@ -0,0 +1,132 @@ +{ + "requestContext": { + "product-family-id": "productFamilyId", + "source": "source", + "requestor-id": "requestorId", + "mso-request-id": "requestId", + "subscription-service-type": "subscriptionServiceType", + "user-params": { + + "mns_vfw_protected_route_prefixes": [ { + "interface_route_table_routes_route" : "1.1.1.1/32" + }, { + "interface_route_table_routes_route" : "0::1/128" + } ], + "name1": "value1" + }, + "action": "createInstance", + "callback-url": "callbackURL", + "requestParameters": { + "subscriptionServiceType": "subscriptionServiceType", + "userParams": [ + + { + "name" : "mns_vfw_protected_route_prefixes", + "value" : [ { + "interface_route_table_routes_route" : "1.1.1.1/32" + }, { + "interface_route_table_routes_route" : "0::1/128" + } ] + }, + { + "name": "name1", + "value": "value1" + }, + { + "ignore": "false", + "skip": "ignore" + } + ] + }, + "configurationParameters": [ + { + "availability-zone":"$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[0]", + "xtz-123":"$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[0]" + } + ] + }, + "orchContext": { + "is-rollback-enabled": false + }, + "cloudRegion": { + "lcp-cloud-region-id": "lcpCloudRegionId", + "cloud-owner": "test-owner-name", + "tenant-id": "tenantId", + "complex": "complexName" + }, + "userInput": null, + "customer": { + "global-customer-id": "globalCustomerId", + "subscriber-name": "subscriberName", + "subscriber-type": "subscriberType", + "service-subscription": { + "service-type": "subscriptionServiceType", + "service-instances": [ + { + "service-instance-id": "3655a595-05d1-433c-93c0-3afd6b572545", + "service-instance-name": "serviceInstanceName", + "orchestration-status": "PRECREATED", + "owning-entity": { + "owning-entity-id": "owningEntityId", + "owning-entity-name": "owningEntityName" + }, + "project": { + "project-name": "projectName" + }, + "vnfs": [], + "allotted-resources": [], + "networks": [], + "vhn-portal-url": null, + "service-instance-location-id": null, + "selflink": null, + "metadata": null, + "configurations": [], + "model-info-service-instance": { + "description": "description", + "created": null, + "model-name": "modelName", + "model-uuid": "modelUUID", + "model-invariant-uuid": "modelInvariantUUID", + "model-version": "modelVersion", + "service-type": "serviceType", + "service-role": "serviceRole", + "environment-context": "environmentContext", + "workload-context": "workloadContext" + } + } + ] + } + }, + "serviceInstance": { + "service-instance-id": "3655a595-05d1-433c-93c0-3afd6b572545", + "service-instance-name": "serviceInstanceName", + "orchestration-status": "PRECREATED", + "owning-entity": { + "owning-entity-id": "owningEntityId", + "owning-entity-name": "owningEntityName" + }, + "project": { + "project-name": "projectName" + }, + "vnfs": [], + "allotted-resources": [], + "networks": [], + "vhn-portal-url": null, + "service-instance-location-id": null, + "selflink": null, + "metadata": null, + "configurations": [], + "model-info-service-instance": { + "description": "description", + "created": null, + "model-name": "modelName", + "model-uuid": "modelUUID", + "model-invariant-uuid": "modelInvariantUUID", + "model-version": "modelVersion", + "service-type": "serviceType", + "service-role": "serviceRole", + "environment-context": "environmentContext", + "workload-context": "workloadContext" + } + } +} diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestContextExpected.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestContextExpected.json index 906903e0b2..06b219df38 100644 --- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestContextExpected.json +++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestContextExpected.json @@ -6,21 +6,31 @@ "action": null, "callback-url": "callbackURL", "user-params": { - "name1": "value1", - "name2": "value2" + + "mns_vfw_protected_route_prefixes": [ { + "interface_route_table_routes_route" : "1.1.1.1/32" + }, { + "interface_route_table_routes_route" : "0::1/128" + } ], + "name1": "value1" }, "requestParameters": { "subscriptionServiceType": "subscriptionServiceType", "userParams": [ + { + "name" : "mns_vfw_protected_route_prefixes", + "value" : [ { + "interface_route_table_routes_route" : "1.1.1.1/32" + }, { + "interface_route_table_routes_route" : "0::1/128" + } ] + }, + { "name": "name1", "value": "value1" }, { - "name": "name2", - "value": "value2" - }, - { "ignore": "false", "skip": "ignore" } diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetailsInput_mapReqContext.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetailsInput_mapReqContext.json index 9afbdd9150..7e28b44abd 100644 --- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetailsInput_mapReqContext.json +++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetailsInput_mapReqContext.json @@ -9,20 +9,22 @@ "requestParameters": { "subscriptionServiceType": "subscriptionServiceType", "userParams": [ - { - "name": "name1", - "value": "value1" - }, - { - "name": "name2", - "value": "value2" - }, - { - "ignore": "false", - "skip": "ignore" - } - ] - + { + "name" : "mns_vfw_protected_route_prefixes", + "value" : [ { + "interface_route_table_routes_route" : "1.1.1.1/32" + }, { + "interface_route_table_routes_route" : "0::1/128" + } ] + }, + { + "name": "name1", + "value": "value1" + }, + { + "ignore": "false", + "skip": "ignore" + }] }, "configurationParameters": [ { |