summaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-common
diff options
context:
space:
mode:
Diffstat (limited to 'mso-api-handlers/mso-api-handler-common')
-rw-r--r--mso-api-handlers/mso-api-handler-common/pom.xml39
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/BpmnRequest.java8
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaBooleanInput.java5
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaBpmnRequestInput.java4
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaInput.java4
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaIntegerInput.java5
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaRequest.java8
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaResponse.java2
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaVIDRequest.java40
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/BPELRestClient.java2
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaClient.java38
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaTaskClient.java17
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CommonConstants.java3
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/RequestClient.java3
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ResponseHandler.java2
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/BPELRestClientTest.java7
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaClientTest.java8
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaRequestTest.java12
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaResponseTest.java12
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/ResponseHandlerTest.java6
20 files changed, 105 insertions, 120 deletions
diff --git a/mso-api-handlers/mso-api-handler-common/pom.xml b/mso-api-handlers/mso-api-handler-common/pom.xml
index 28cc3b5ff4..5b15c5f0d4 100644
--- a/mso-api-handlers/mso-api-handler-common/pom.xml
+++ b/mso-api-handlers/mso-api-handler-common/pom.xml
@@ -18,26 +18,6 @@
</properties>
<dependencies>
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>resteasy-jaxrs</artifactId>
- <version>3.0.19.Final</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
<dependency>
<groupId>commons-io</groupId>
@@ -60,17 +40,6 @@
</dependency>
<dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-core-asl</artifactId>
- <version>1.9.13</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-mapper-asl</artifactId>
- <version>1.9.13</version>
- </dependency>
-
- <dependency>
<groupId>org.onap.so</groupId>
<artifactId>mso-catalog-db</artifactId>
<version>${project.version}</version>
@@ -82,16 +51,10 @@
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <version>1.10.19</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
</build>
<packaging>jar</packaging>
-</project> \ No newline at end of file
+</project>
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/BpmnRequest.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/BpmnRequest.java
index 27a310fd2d..e4db35bcca 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/BpmnRequest.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/BpmnRequest.java
@@ -20,12 +20,12 @@
package org.openecomp.mso.apihandler.camundabeans;
-import org.codehaus.jackson.annotate.JsonProperty;
-import org.codehaus.jackson.map.annotate.JsonRootName;
-import org.codehaus.jackson.annotate.JsonPropertyOrder;
-
import org.openecomp.mso.apihandler.common.CommonConstants;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonRootName;
+
/**
* JavaBean JSON class for a "bpmnRequest" which contains the JSON payload that
* will be passed to the Camunda process
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaBooleanInput.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaBooleanInput.java
index b7d2b614e9..4c25bf78cf 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaBooleanInput.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaBooleanInput.java
@@ -20,11 +20,10 @@
package org.openecomp.mso.apihandler.camundabeans;
-import org.codehaus.jackson.annotate.JsonProperty;
-import org.codehaus.jackson.map.annotate.JsonRootName;
-
import org.openecomp.mso.apihandler.common.CommonConstants;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
/**
* JavaBean JSON class for a "gMyServiceInput" which contains the xml payload that
* will be passed to the Camunda process
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaBpmnRequestInput.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaBpmnRequestInput.java
index f73829688c..62f09d175a 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaBpmnRequestInput.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaBpmnRequestInput.java
@@ -20,10 +20,10 @@
package org.openecomp.mso.apihandler.camundabeans;
-import org.codehaus.jackson.annotate.JsonProperty;
-
import org.openecomp.mso.apihandler.common.CommonConstants;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
/**
* JavaBean JSON class for a "gMyServiceInput" which contains the xml payload that
* will be passed to the Camunda process
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaInput.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaInput.java
index 0c69a76b14..1eff5275a2 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaInput.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaInput.java
@@ -21,10 +21,10 @@
package org.openecomp.mso.apihandler.camundabeans;
-import org.codehaus.jackson.annotate.JsonProperty;
-
import org.openecomp.mso.apihandler.common.CommonConstants;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
/**
* JavaBean JSON class for a "gMyServiceInput" which contains the xml payload that
* will be passed to the Camunda process
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaIntegerInput.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaIntegerInput.java
index 7b593b49d0..d3039c496d 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaIntegerInput.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaIntegerInput.java
@@ -20,11 +20,10 @@
package org.openecomp.mso.apihandler.camundabeans;
-import org.codehaus.jackson.annotate.JsonProperty;
-import org.codehaus.jackson.map.annotate.JsonRootName;
-
import org.openecomp.mso.apihandler.common.CommonConstants;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
/**
* JavaBean JSON class for a "gMyServiceInput" which contains the xml payload that
* will be passed to the Camunda process
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaRequest.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaRequest.java
index d73ba3882b..60a9efe9b6 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaRequest.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaRequest.java
@@ -22,12 +22,12 @@ package org.openecomp.mso.apihandler.camundabeans;
-import org.codehaus.jackson.annotate.JsonProperty;
-import org.codehaus.jackson.map.annotate.JsonRootName;
-import org.codehaus.jackson.annotate.JsonPropertyOrder;
-
import org.openecomp.mso.apihandler.common.CommonConstants;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonRootName;
+
/**
* JavaBean JSON class for a "variables" which contains the xml payload that
* will be passed to the Camunda process
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaResponse.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaResponse.java
index b7b5a11bd6..3c5c5ecb1d 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaResponse.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaResponse.java
@@ -21,7 +21,7 @@
package org.openecomp.mso.apihandler.camundabeans;
-import org.codehaus.jackson.annotate.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonProperty;
/**
* JavaBean JSON class for a "variables" which contains the xml payload that
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaVIDRequest.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaVIDRequest.java
index 3ef6d4974c..faa669133f 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaVIDRequest.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/camundabeans/CamundaVIDRequest.java
@@ -20,12 +20,12 @@
package org.openecomp.mso.apihandler.camundabeans;
-import org.codehaus.jackson.annotate.JsonProperty;
-import org.codehaus.jackson.map.annotate.JsonRootName;
-import org.codehaus.jackson.annotate.JsonPropertyOrder;
-
import org.openecomp.mso.apihandler.common.CommonConstants;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonRootName;
+
/**
* JavaBean JSON class for a "variables" which contains the JSON payload that
* will be passed to the Camunda process
@@ -36,8 +36,9 @@ import org.openecomp.mso.apihandler.common.CommonConstants;
CommonConstants.REQUEST_ACTION_VARIABLE, CommonConstants.SERVICE_INSTANCE_ID_VARIABLE,
CommonConstants.VNF_ID_VARIABLE, CommonConstants.VF_MODULE_ID_VARIABLE,
CommonConstants.VOLUME_GROUP_ID_VARIABLE, CommonConstants.NETWORK_ID_VARIABLE,
- CommonConstants.SERVICE_TYPE_VARIABLE, CommonConstants.VNF_TYPE_VARIABLE,
- CommonConstants.VF_MODULE_TYPE_VARIABLE, CommonConstants.NETWORK_TYPE_VARIABLE,
+ CommonConstants.CONFIGURATION_ID_VARIABLE, CommonConstants.SERVICE_TYPE_VARIABLE,
+ CommonConstants.VNF_TYPE_VARIABLE, CommonConstants.VF_MODULE_TYPE_VARIABLE,
+ CommonConstants.NETWORK_TYPE_VARIABLE, CommonConstants.CAMUNDA_SERVICE_INPUT,
CommonConstants.CAMUNDA_SERVICE_INPUT, CommonConstants.RECIPE_PARAMS})
@JsonRootName(CommonConstants.CAMUNDA_ROOT_INPUT)
public class CamundaVIDRequest {
@@ -79,6 +80,9 @@ public class CamundaVIDRequest {
@JsonProperty(CommonConstants.NETWORK_ID_VARIABLE)
private CamundaInput networkId;
+ @JsonProperty(CommonConstants.CONFIGURATION_ID_VARIABLE)
+ private CamundaInput configurationId;
+
@JsonProperty(CommonConstants.SERVICE_TYPE_VARIABLE)
private CamundaInput serviceType;
@@ -213,6 +217,16 @@ public class CamundaVIDRequest {
this.networkId = networkId;
}
+ @JsonProperty(CommonConstants.CONFIGURATION_ID_VARIABLE)
+ public CamundaInput getConfigurationId() {
+ return configurationId;
+ }
+
+ @JsonProperty(CommonConstants.CONFIGURATION_ID_VARIABLE)
+ public void setConfigurationId(CamundaInput configurationId) {
+ this.configurationId = configurationId;
+ }
+
@JsonProperty(CommonConstants.SERVICE_TYPE_VARIABLE)
public CamundaInput getServiceType() {
return serviceType;
@@ -254,16 +268,16 @@ public class CamundaVIDRequest {
}
@JsonProperty(CommonConstants.RECIPE_PARAMS)
- public CamundaInput getRecipeParams() {
- return recipeParams;
- }
+ public CamundaInput getRecipeParams() {
+ return recipeParams;
+ }
@JsonProperty(CommonConstants.RECIPE_PARAMS)
- public void setRecipeParams(CamundaInput recipeParams) {
- this.recipeParams = recipeParams;
- }
+ public void setRecipeParams(CamundaInput recipeParams) {
+ this.recipeParams = recipeParams;
+ }
- @Override
+ @Override
public String toString() {
//return "CamundaRequest [requestId=" + + ", host="
// + host + ", schema=" + schema + ", reqid=" + reqid + ", svcid="
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/BPELRestClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/BPELRestClient.java
index cc68a45d19..1a086ac35c 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/BPELRestClient.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/BPELRestClient.java
@@ -87,7 +87,7 @@ public class BPELRestClient extends RequestClient {
@Override
public HttpResponse post(String requestId, boolean isBaseVfModule,
int recipeTimeout, String requestAction, String serviceInstanceId,
- String vnfId, String vfModuleId, String volumeGroupId, String networkId,
+ String vnfId, String vfModuleId, String volumeGroupId, String networkId, String configurationId,
String serviceType, String vnfType, String vfModuleType, String networkType,
String requestDetails, String recipeParamXsd) {
return null;
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaClient.java
index 9258cabe5b..9cc89530c4 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaClient.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaClient.java
@@ -21,18 +21,24 @@
package org.openecomp.mso.apihandler.common;
-import org.openecomp.mso.apihandler.camundabeans.*;
-import org.openecomp.mso.logger.MessageEnum;
-import org.openecomp.mso.logger.MsoLogger;
+import java.io.IOException;
+
+import javax.xml.bind.DatatypeConverter;
+
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
+import org.openecomp.mso.apihandler.camundabeans.CamundaBooleanInput;
+import org.openecomp.mso.apihandler.camundabeans.CamundaInput;
+import org.openecomp.mso.apihandler.camundabeans.CamundaIntegerInput;
+import org.openecomp.mso.apihandler.camundabeans.CamundaRequest;
+import org.openecomp.mso.apihandler.camundabeans.CamundaVIDRequest;
+import org.openecomp.mso.logger.MessageEnum;
+import org.openecomp.mso.logger.MsoLogger;
-import javax.xml.bind.DatatypeConverter;
-import java.io.IOException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
public class CamundaClient extends RequestClient{
private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.APIH);
@@ -98,14 +104,14 @@ public class CamundaClient extends RequestClient{
@Override
public HttpResponse post(String requestId, boolean isBaseVfModule,
int recipeTimeout, String requestAction, String serviceInstanceId,
- String vnfId, String vfModuleId, String volumeGroupId, String networkId,
+ String vnfId, String vfModuleId, String volumeGroupId, String networkId, String configurationId,
String serviceType, String vnfType, String vfModuleType, String networkType,
String requestDetails, String recipeParamXsd)
throws ClientProtocolException, IOException{
HttpPost post = new HttpPost(url);
msoLogger.debug(CAMUNDA_URL_MESAGE + url);
String jsonReq = wrapVIDRequest(requestId, isBaseVfModule, recipeTimeout, requestAction,
- serviceInstanceId, vnfId, vfModuleId, volumeGroupId, networkId,
+ serviceInstanceId, vnfId, vfModuleId, volumeGroupId, networkId, configurationId,
serviceType, vnfType, vfModuleType, networkType, requestDetails, recipeParamXsd);
StringEntity input = new StringEntity(jsonReq);
@@ -167,7 +173,7 @@ public class CamundaClient extends RequestClient{
camundaRequest.setSchema(schema);
camundaRequest.setTimeout(timeout);
ObjectMapper mapper = new ObjectMapper();
- mapper.configure(SerializationConfig.Feature.WRAP_ROOT_VALUE, true);
+ mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
jsonReq = mapper.writeValueAsString(camundaRequest);
msoLogger.debug("request body is " + jsonReq);
@@ -179,7 +185,7 @@ public class CamundaClient extends RequestClient{
private String wrapVIDRequest(String requestId, boolean isBaseVfModule,
int recipeTimeout, String requestAction, String serviceInstanceId,
- String vnfId, String vfModuleId, String volumeGroupId, String networkId,
+ String vnfId, String vfModuleId, String volumeGroupId, String networkId, String configurationId,
String serviceType, String vnfType, String vfModuleType, String networkType,
String requestDetails, String recipeParams){
String jsonReq = null;
@@ -204,6 +210,9 @@ public class CamundaClient extends RequestClient{
if(networkId == null){
networkId ="";
}
+ if(configurationId == null){
+ configurationId ="";
+ }
if(serviceType == null){
serviceType ="";
}
@@ -220,8 +229,6 @@ public class CamundaClient extends RequestClient{
requestDetails ="";
}
-
-
try{
CamundaVIDRequest camundaRequest = new CamundaVIDRequest();
CamundaInput serviceInput = new CamundaInput();
@@ -235,6 +242,7 @@ public class CamundaClient extends RequestClient{
CamundaInput vfModuleIdInput = new CamundaInput();
CamundaInput volumeGroupIdInput = new CamundaInput();
CamundaInput networkIdInput = new CamundaInput();
+ CamundaInput configurationIdInput = new CamundaInput();
CamundaInput serviceTypeInput = new CamundaInput();
CamundaInput vnfTypeInput = new CamundaInput();
CamundaInput vfModuleTypeInput = new CamundaInput();
@@ -250,6 +258,7 @@ public class CamundaClient extends RequestClient{
vfModuleIdInput.setValue(vfModuleId);
volumeGroupIdInput.setValue(volumeGroupId);
networkIdInput.setValue(networkId);
+ configurationIdInput.setValue(configurationId);
serviceTypeInput.setValue(serviceType);
vnfTypeInput.setValue(vnfType);
vfModuleTypeInput.setValue(vfModuleType);
@@ -268,13 +277,14 @@ public class CamundaClient extends RequestClient{
camundaRequest.setVfModuleId(vfModuleIdInput);
camundaRequest.setVolumeGroupId(volumeGroupIdInput);
camundaRequest.setNetworkId(networkIdInput);
+ camundaRequest.setConfigurationId(configurationIdInput);
camundaRequest.setServiceType(serviceTypeInput);
camundaRequest.setVnfType(vnfTypeInput);
camundaRequest.setVfModuleType(vfModuleTypeInput);
camundaRequest.setNetworkType(networkTypeInput);
camundaRequest.setRecipeParams(recipeParamsInput);
ObjectMapper mapper = new ObjectMapper();
- mapper.configure(SerializationConfig.Feature.WRAP_ROOT_VALUE, true);
+ mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
jsonReq = mapper.writeValueAsString(camundaRequest);
msoLogger.debug("request body is " + jsonReq);
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaTaskClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaTaskClient.java
index 4b179daa7c..3941e1e5af 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaTaskClient.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CamundaTaskClient.java
@@ -20,15 +20,16 @@
package org.openecomp.mso.apihandler.common;
-import org.openecomp.mso.logger.MsoLogger;
+import java.io.IOException;
+
+import javax.xml.bind.DatatypeConverter;
+
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
-
-import javax.xml.bind.DatatypeConverter;
-import java.io.IOException;
+import org.openecomp.mso.logger.MsoLogger;
public class CamundaTaskClient extends RequestClient{
private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.APIH);
@@ -53,7 +54,7 @@ public class CamundaTaskClient extends RequestClient{
String userCredentials = getEncryptedPropValue(encryptedCredentials, CommonConstants.DEFAULT_BPEL_AUTH, CommonConstants.ENCRYPTION_KEY);
if(userCredentials != null){
post.addHeader("Authorization", "Basic " + DatatypeConverter
- .printBase64Binary(userCredentials.getBytes()));
+ .printBase64Binary(userCredentials.getBytes()));
}
}
}
@@ -73,7 +74,7 @@ public class CamundaTaskClient extends RequestClient{
@Override
public HttpResponse post(String requestId, boolean isBaseVfModule,
int recipeTimeout, String requestAction, String serviceInstanceId,
- String vnfId, String vfModuleId, String volumeGroupId, String networkId,
+ String vnfId, String vfModuleId, String volumeGroupId, String networkId, String configurationId,
String serviceType, String vnfType, String vfModuleType, String networkType,
String requestDetails, String recipeParamXsd)
throws ClientProtocolException, IOException{
@@ -91,8 +92,8 @@ public class CamundaTaskClient extends RequestClient{
if(encryptedCredentials != null){
String userCredentials = getEncryptedPropValue(encryptedCredentials, CommonConstants.DEFAULT_BPEL_AUTH, CommonConstants.ENCRYPTION_KEY);
if(userCredentials != null){
- get.addHeader("Authorization", "Basic " + DatatypeConverter
- .printBase64Binary(userCredentials.getBytes()));
+ get.addHeader("Authorization", "Basic " + new String(DatatypeConverter
+ .printBase64Binary(userCredentials.getBytes())));
}
}
}
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CommonConstants.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CommonConstants.java
index cfbe892e68..4dac998527 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CommonConstants.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/CommonConstants.java
@@ -58,11 +58,14 @@ public final class CommonConstants {
public static final String VF_MODULE_ID_VARIABLE = "vfModuleId";
public static final String VOLUME_GROUP_ID_VARIABLE = "volumeGroupId";
public static final String NETWORK_ID_VARIABLE = "networkId";
+ public static final String CONFIGURATION_ID_VARIABLE = "configurationId";
public static final String SERVICE_TYPE_VARIABLE = "serviceType";
public static final String VNF_TYPE_VARIABLE = "vnfType";
public static final String VF_MODULE_TYPE_VARIABLE = "vfModuleType";
public static final String NETWORK_TYPE_VARIABLE = "networkType";
public static final String REQUEST_DETAILS_VARIABLE = "requestDetails";
+ public static final String ALACARTE_ORCHESTRATION = "mso.infra.default.alacarte.orchestrationUri";
+ public static final String ALACARTE_RECIPE_TIMEOUT = "mso.infra.default.alacarte.recipeTimeout";
public static final String RECIPE_PARAMS = "recipeParams";
private CommonConstants () {
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/RequestClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/RequestClient.java
index eaf8be76a3..d702a63fda 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/RequestClient.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/RequestClient.java
@@ -26,7 +26,6 @@ import java.security.GeneralSecurityException;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
-
import org.openecomp.mso.logger.MsoLogger;
import org.openecomp.mso.properties.MsoJavaProperties;
import org.openecomp.mso.utils.CryptoUtils;
@@ -72,7 +71,7 @@ public abstract class RequestClient {
public abstract HttpResponse post(String requestId, boolean isBaseVfModule,
int recipeTimeout, String requestAction, String serviceInstanceId,
- String vnfId, String vfModuleId, String volumeGroupId, String networkId,
+ String vnfId, String vfModuleId, String volumeGroupId, String networkId, String configurationId,
String serviceType, String vnfType, String vfModuleType, String networkType,
String requestDetails, String recipeParamXsd)
throws ClientProtocolException, IOException;
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ResponseHandler.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ResponseHandler.java
index 4e7cf4cddd..732b7786b2 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ResponseHandler.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/ResponseHandler.java
@@ -27,7 +27,7 @@ import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.util.EntityUtils;
-import org.codehaus.jackson.map.ObjectMapper;
+import com.fasterxml.jackson.databind.ObjectMapper;
import org.openecomp.mso.apihandler.camundabeans.CamundaResponse;
import org.openecomp.mso.logger.MsoLogger;
diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/BPELRestClientTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/BPELRestClientTest.java
index 4e4f0ee189..6cc6c562e5 100644
--- a/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/BPELRestClientTest.java
+++ b/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/BPELRestClientTest.java
@@ -24,7 +24,6 @@ package org.openecomp.mso.camunda.tests;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
-import java.util.Properties;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
@@ -34,19 +33,19 @@ import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.message.BasicHttpResponse;
import org.apache.http.message.BasicStatusLine;
-import org.codehaus.jackson.JsonGenerationException;
-import org.codehaus.jackson.map.JsonMappingException;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-
import org.openecomp.mso.apihandler.common.CommonConstants;
import org.openecomp.mso.apihandler.common.RequestClient;
import org.openecomp.mso.apihandler.common.RequestClientFactory;
import org.openecomp.mso.properties.MsoJavaProperties;
+import com.fasterxml.jackson.core.JsonGenerationException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+
/**
* This class implements test methods of Camunda Beans.
diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaClientTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaClientTest.java
index 6ee637d864..d204afe93c 100644
--- a/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaClientTest.java
+++ b/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaClientTest.java
@@ -25,8 +25,6 @@ import static org.junit.Assert.assertEquals;
import java.io.IOException;
-import java.util.Properties;
-
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.ProtocolVersion;
@@ -35,19 +33,19 @@ import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.message.BasicHttpResponse;
import org.apache.http.message.BasicStatusLine;
-import org.codehaus.jackson.JsonGenerationException;
-import org.codehaus.jackson.map.JsonMappingException;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-
import org.openecomp.mso.apihandler.common.CommonConstants;
import org.openecomp.mso.apihandler.common.RequestClient;
import org.openecomp.mso.apihandler.common.RequestClientFactory;
import org.openecomp.mso.properties.MsoJavaProperties;
+import com.fasterxml.jackson.core.JsonGenerationException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+
/**
* This class implements test methods of Camunda Beans.
diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaRequestTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaRequestTest.java
index 753ce9dee8..622bb1e242 100644
--- a/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaRequestTest.java
+++ b/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaRequestTest.java
@@ -26,16 +26,16 @@ import static org.junit.Assert.assertEquals;
import java.io.IOException;
-import org.codehaus.jackson.JsonGenerationException;
-import org.codehaus.jackson.map.JsonMappingException;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
import org.junit.Test;
-
import org.openecomp.mso.apihandler.camundabeans.CamundaInput;
import org.openecomp.mso.apihandler.camundabeans.CamundaRequest;
import org.openecomp.mso.apihandler.common.CommonConstants;
+import com.fasterxml.jackson.core.JsonGenerationException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+
/**
* This class implements test methods of Camunda Beans.
*
@@ -67,7 +67,7 @@ public class CamundaRequestTest {
timeout.setValue("");
camundaRequest.setTimeout(timeout);
ObjectMapper mapper = new ObjectMapper();
- mapper.configure(SerializationConfig.Feature.WRAP_ROOT_VALUE, true);
+ mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
String json = mapper.writeValueAsString(camundaRequest);
System.out.println(json);
diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaResponseTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaResponseTest.java
index c561f1a245..9b36a984b1 100644
--- a/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaResponseTest.java
+++ b/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/CamundaResponseTest.java
@@ -25,14 +25,14 @@ import static org.junit.Assert.assertEquals;
import java.io.IOException;
-import org.codehaus.jackson.JsonGenerationException;
-import org.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.JsonMappingException;
-import org.codehaus.jackson.map.ObjectMapper;
import org.junit.Test;
-
import org.openecomp.mso.apihandler.camundabeans.CamundaResponse;
+import com.fasterxml.jackson.core.JsonGenerationException;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
/**
* This class implements test methods of Camunda Beans.
*
@@ -44,7 +44,7 @@ public class CamundaResponseTest {
public final void testDeserialization() throws JsonGenerationException,
JsonMappingException, IOException {
ObjectMapper mapper = new ObjectMapper(); // can reuse, share globally
- mapper.enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ mapper.enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
String responseBody = "{ \"response\": \"<xml>xml</xml>\","+
"\"messageCode\": 200,"+
diff --git a/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/ResponseHandlerTest.java b/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/ResponseHandlerTest.java
index 99a83d3ed9..d0031f3946 100644
--- a/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/ResponseHandlerTest.java
+++ b/mso-api-handlers/mso-api-handler-common/src/test/java/org/openecomp/mso/camunda/tests/ResponseHandlerTest.java
@@ -32,12 +32,12 @@ import org.apache.http.ProtocolVersion;
import org.apache.http.entity.StringEntity;
import org.apache.http.message.BasicHttpResponse;
import org.apache.http.message.BasicStatusLine;
-import org.codehaus.jackson.JsonGenerationException;
-import org.codehaus.jackson.map.JsonMappingException;
import org.junit.Test;
-
import org.openecomp.mso.apihandler.common.ResponseHandler;
+import com.fasterxml.jackson.core.JsonGenerationException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+
/**
* This class implements test methods of CamundaResoponseHandler.
*