summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-openstack-adapters/pom.xml18
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java9
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy2
3 files changed, 23 insertions, 6 deletions
diff --git a/adapters/mso-openstack-adapters/pom.xml b/adapters/mso-openstack-adapters/pom.xml
index 933077b59a..9cee2882be 100644
--- a/adapters/mso-openstack-adapters/pom.xml
+++ b/adapters/mso-openstack-adapters/pom.xml
@@ -260,10 +260,24 @@
</dependency>
<dependency>
<groupId>org.pacesys.openstack4j.connectors</groupId>
- <artifactId>openstack4j-httpclient</artifactId>
+ <artifactId>openstack4j-jersey2</artifactId>
<version>3.2.0</version>
</dependency>
-
+ <dependency>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-client</artifactId>
+ <version>2.22.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.media</groupId>
+ <artifactId>jersey-media-json-jackson</artifactId>
+ <version>2.22.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-common</artifactId>
+ <version>2.22.1</version>
+ </dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
index b8977f05d8..4ad32909b0 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/impl/SDNCRestClient.java
@@ -24,7 +24,6 @@
package org.onap.so.adapters.sdnc.impl;
-
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.InputStream;
@@ -65,7 +64,6 @@ import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-
@Component
public class SDNCRestClient {
@@ -153,10 +151,15 @@ public class SDNCRestClient {
String basicAuth = "Basic " + DatatypeConverter.printBase64Binary(userCredentials.getBytes());
con.setRequestProperty("Authorization", basicAuth);
con.setRequestMethod(rt.getReqMethod());
+ String msoAction = rt.getMsoAction();
// Add request headers
if ("POST".equals(rt.getReqMethod()) || "PUT".equals(rt.getReqMethod())) {
- con.setRequestProperty("Content-type", "application/xml");
+ if (Constants.MSO_ACTION_MDONS.equals(msoAction)) {
+ con.setRequestProperty("Content-type", "application/json");
+ } else {
+ con.setRequestProperty("Content-type", "application/xml");
+ }
con.setRequestProperty("Content-length", String.valueOf(sdncReqBody.length()));
con.setDoOutput(true);
out = new DataOutputStream(con.getOutputStream());
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
index 21fc50c9b6..0a7753e9e5 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteE2EServiceInstance.groovy
@@ -450,6 +450,7 @@ public class DoDeleteE2EServiceInstance extends AbstractServiceTaskProcessor {
execution.setVariable("serviceModelInfo", serviceDecomposition.getModelInfo())
List<Resource> deleteResourceList = serviceDecomposition.getServiceResources()
+ List<ImmutablePair<Resource, List<Resource>>> deleteRealResourceList = new ArrayList<ImmutablePair<Resource, List<Resource>>>()
if (serviceDecomposition.getServiceType().equals("MDONS_OTN")){
for (Resource resource : deleteResourceList) {
String serviceName = execution.getVariable("serviceInstanceName")
@@ -469,7 +470,6 @@ public class DoDeleteE2EServiceInstance extends AbstractServiceTaskProcessor {
relationShipList = jsonSlurper.parseText(serviceRelationShip)
}
- List<ImmutablePair<Resource, List<Resource>>> deleteRealResourceList = new ArrayList<ImmutablePair<Resource, List<Resource>>>()
//Set the real resource instance id to the decomosed resource list
//reset the resource instance id , because in the decompose flow ,its a random one.