summaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-openstack-adapters')
-rw-r--r--adapters/mso-openstack-adapters/pom.xml164
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackService.java6
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackServiceData.java2
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapter.java8
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsync.java4
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java4
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java36
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java12
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java18
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/audit/AuditStackServiceDataTest.java2
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImplTest.java8
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterImplTest.java44
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java4
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java2
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImplTest.java12
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VnfAdapterRestTest.java8
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VolumeGroupAdapterCommon.java8
17 files changed, 146 insertions, 196 deletions
diff --git a/adapters/mso-openstack-adapters/pom.xml b/adapters/mso-openstack-adapters/pom.xml
index f2ee07317c..f2f411d5b6 100644
--- a/adapters/mso-openstack-adapters/pom.xml
+++ b/adapters/mso-openstack-adapters/pom.xml
@@ -13,8 +13,8 @@
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
-
- <plugins>
+
+ <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
@@ -36,75 +36,25 @@
</executions>
</plugin>
-<!-- run the following plugin only when there's a wsdl change and you need to recompile the java classes
+ <!-- run the following plugin only when there's a wsdl change and you
+ need to recompile the java classes <plugin> <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jaxws-maven-plugin</artifactId> <version>2.4.1</version> <executions>
+ <execution> <id>generate-network-async-stubs</id> <phase>process-classes</phase>
+ <goals> <goal>wsimport</goal> </goals> <configuration> <vmArgs> <vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
+ </vmArgs> <wsdlDirectory>src/main/resources/wsdl</wsdlDirectory> <wsdlFiles>
+ <wsdlFile>NetworkAdapterNotify.wsdl</wsdlFile> </wsdlFiles> <wsdlLocation>/NetworkAdapterNotify.wsdl</wsdlLocation>
+ <packageName>org.onap.so.adapters.network.async.client</packageName> <xnocompile>false</xnocompile>
+ <keep>true</keep> </configuration> </execution> <execution> <id>generate-vnf-async-stubs</id>
+ <phase>process-classes</phase> <goals> <goal>wsimport</goal> </goals> <configuration>
+ <vmArgs> <vmArg>-Djavax.xml.accessExternalSchema=all</vmArg> </vmArgs> <wsdlDirectory>src/main/resources/wsdl</wsdlDirectory>
+ <wsdlFiles> <wsdlFile>VnfAdapterNotify.wsdl</wsdlFile> </wsdlFiles> <wsdlLocation>/VnfAdapterNotify.wsdl</wsdlLocation>
+ <packageName>org.onap.so.adapters.vnf.async.client</packageName> <xnocompile>false</xnocompile>
+ <keep>true</keep> </configuration> </execution> </executions> </plugin> <plugin>
+ <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId>
+ <version>3.0.0</version> <executions> <execution> <id>add-source</id> <phase>generate-sources</phase>
+ <goals> <goal>add-source</goal> </goals> <configuration> <sources> <source>${project.build.directory}/generated-sources/wsimport/</source>
+ </sources> </configuration> </execution> </executions> </plugin> -->
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jaxws-maven-plugin</artifactId>
- <version>2.4.1</version>
- <executions>
- <execution>
- <id>generate-network-async-stubs</id>
- <phase>process-classes</phase>
- <goals>
- <goal>wsimport</goal>
- </goals>
- <configuration>
- <vmArgs>
- <vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
- </vmArgs>
- <wsdlDirectory>src/main/resources/wsdl</wsdlDirectory>
- <wsdlFiles>
- <wsdlFile>NetworkAdapterNotify.wsdl</wsdlFile>
- </wsdlFiles>
- <wsdlLocation>/NetworkAdapterNotify.wsdl</wsdlLocation>
- <packageName>org.onap.so.adapters.network.async.client</packageName>
- <xnocompile>false</xnocompile>
- <keep>true</keep>
- </configuration>
- </execution>
-
- <execution>
- <id>generate-vnf-async-stubs</id>
- <phase>process-classes</phase>
- <goals>
- <goal>wsimport</goal>
- </goals>
- <configuration>
- <vmArgs>
- <vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
- </vmArgs>
- <wsdlDirectory>src/main/resources/wsdl</wsdlDirectory>
- <wsdlFiles>
- <wsdlFile>VnfAdapterNotify.wsdl</wsdlFile>
- </wsdlFiles>
- <wsdlLocation>/VnfAdapterNotify.wsdl</wsdlLocation>
- <packageName>org.onap.so.adapters.vnf.async.client</packageName>
- <xnocompile>false</xnocompile>
- <keep>true</keep>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>3.0.0</version>
- <executions>
- <execution>
- <id>add-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${project.build.directory}/generated-sources/wsimport/</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- --> <plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
@@ -126,12 +76,12 @@
</execution>
</executions>
</plugin>
- </plugins>
-
-
+ </plugins>
+
+
<pluginManagement>
<plugins>
- <!--This plugin's configuration is used to store Eclipse m2e settings
+ <!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
@@ -168,10 +118,10 @@
</build>
<dependencies>
- <!-- added for spring boot support -->
+ <!-- added for spring boot support -->
<dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-actuator</artifactId>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
@@ -184,7 +134,7 @@
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-spring-boot-starter-jaxws</artifactId>
- <version>${cxf.version}</version>
+ <version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
@@ -192,31 +142,31 @@
<version>${cxf.version}</version>
</dependency>
<dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-rs-service-description-swagger</artifactId>
- <version>${cxf.version}</version>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-rs-service-description-swagger</artifactId>
+ <version>${cxf.version}</version>
</dependency>
<dependency>
- <groupId>org.webjars</groupId>
- <artifactId>swagger-ui</artifactId>
- <version>3.5.0</version>
- </dependency>
+ <groupId>org.webjars</groupId>
+ <artifactId>swagger-ui</artifactId>
+ <version>3.5.0</version>
+ </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>janino</groupId>
- <artifactId>janino</artifactId>
- <version>2.5.15</version>
+ <groupId>janino</groupId>
+ <artifactId>janino</artifactId>
+ <version>2.5.15</version>
</dependency>
-
- <!-- end added for spring boot support -->
-
-
-
- <!-- added for unit testing -->
+
+ <!-- end added for spring boot support -->
+
+
+
+ <!-- added for unit testing -->
<dependency>
<groupId>org.onap.so.adapters</groupId>
<artifactId>mso-adapter-utils</artifactId>
@@ -231,23 +181,23 @@
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>test</scope>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.onap.so</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>ch.vorburger.mariaDB4j</groupId>
- <artifactId>mariaDB4j</artifactId>
- <version>2.2.3</version>
- <scope>test</scope>
- </dependency>
- <dependency>
+ <groupId>ch.vorburger.mariaDB4j</groupId>
+ <artifactId>mariaDB4j</artifactId>
+ <version>2.2.3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-wiremock</artifactId>
<version>1.2.4.RELEASE</version>
@@ -260,13 +210,13 @@
</dependency>
<dependency>
<groupId>org.onap.so.libs.openstack-java-sdk</groupId>
- <artifactId>nova-model</artifactId>
+ <artifactId>nova-model</artifactId>
<version>${openstack.version}</version>
</dependency>
<dependency>
- <groupId>org.camunda.bpm</groupId>
- <artifactId>camunda-external-task-client</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- </dependency>
+ <groupId>org.camunda.bpm</groupId>
+ <artifactId>camunda-external-task-client</artifactId>
+ <version>1.0.0</version>
+ </dependency>
</dependencies>
</project>
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackService.java
index aace75ff99..499c1137c7 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackService.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackService.java
@@ -59,9 +59,9 @@ public class AuditStackService {
ClientRequestInterceptor interceptor = new BasicAuthProvider(env.getRequiredProperty("mso.config.cadi.aafId"),
auth);
ExternalTaskClient client = ExternalTaskClient.create()
- .baseUrl(env.getRequiredProperty("mso.workflow.endpoint")).maxTasks(5).addInterceptor(interceptor)
- .asyncResponseTimeout(120000).backoffStrategy(new ExponentialBackoffStrategy(5000, 2, 30000)).build();
- client.subscribe("InventoryAudit").lockDuration(5000)
+ .baseUrl(env.getRequiredProperty("mso.workflow.endpoint")).maxTasks(1).addInterceptor(interceptor)
+ .asyncResponseTimeout(120000).backoffStrategy(new ExponentialBackoffStrategy(10000, 2, 120000)).build();
+ client.subscribe("InventoryAudit").lockDuration(60000)
.handler(auditStack::executeExternalTask).open();
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackServiceData.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackServiceData.java
index d1f952c829..773705d566 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackServiceData.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/audit/AuditStackServiceData.java
@@ -72,7 +72,7 @@ public class AuditStackServiceData {
}else if(externalTask.getRetries() != null &&
externalTask.getRetries()-1 == 0){
logger.debug("The External Task Id: {} Failed, All Retries Exhausted", externalTask.getId());
- externalTaskService.handleBpmnError(externalTask, "AuditAAIInventoryFailure", "Number of Retries Exceeded auditing inventory");
+ externalTaskService.handleBpmnError(externalTask, "AuditAAIInventoryFailure");
}else{
logger.debug("The External Task Id: {} Failed, Decrementing Retries: {} , Retry Delay: ", externalTask.getId(),externalTask.getRetries()-1, calculateRetryDelay(externalTask.getRetries()));
externalTaskService.handleFailure(externalTask, UNABLE_TO_FIND_ALL_V_SERVERS_AND_L_INTERACES_IN_A_AI, UNABLE_TO_FIND_ALL_V_SERVERS_AND_L_INTERACES_IN_A_AI, externalTask.getRetries()-1, calculateRetryDelay(externalTask.getRetries()));
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapter.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapter.java
index 7c49c9f948..c54b067a78 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapter.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapter.java
@@ -50,7 +50,7 @@ public interface MsoVnfAdapter
@WebParam(name="vnfName") @XmlElement(required=true) String vnfName,
@WebParam(name="requestType") @XmlElement(required=false) String requestType,
@WebParam(name="volumeGroupHeatStackId") @XmlElement(required=false) String volumeGroupHeatStackId,
- @WebParam(name="inputs") Map<String,String> inputs,
+ @WebParam(name="inputs") Map<String,Object> inputs,
@WebParam(name="failIfExists") Boolean failIfExists,
@WebParam(name="backout") Boolean backout,
@WebParam(name="enableBridge") Boolean enableBridge,
@@ -68,7 +68,7 @@ public interface MsoVnfAdapter
@WebParam(name="vnfName") @XmlElement(required=true) String vnfName,
@WebParam(name="requestType") @XmlElement(required=false) String requestType,
@WebParam(name="volumeGroupHeatStackId") @XmlElement(required=false) String volumeGroupHeatStackId,
- @WebParam(name="inputs") Map<String,String> inputs,
+ @WebParam(name="inputs") Map<String,Object> inputs,
@WebParam(name="request") MsoRequest msoRequest,
@WebParam(name="outputs", mode=Mode.OUT) Holder<Map<String,String>> outputs,
@WebParam(name="rollback", mode=Mode.OUT) Holder<VnfRollback> rollback )
@@ -109,7 +109,7 @@ public interface MsoVnfAdapter
@WebParam(name="volumeGroupHeatStackId") @XmlElement(required=false) String volumeGroupHeatStackId,
@WebParam(name="baseVfHeatStackId") @XmlElement(required=false) String baseVfHeatStackId,
@WebParam(name = "modelCustomizationUuid") @XmlElement(required = false) String modelCustomizationUuid,
- @WebParam(name="inputs") Map<String,String> inputs,
+ @WebParam(name="inputs") Map<String,Object> inputs,
@WebParam(name="failIfExists") Boolean failIfExists,
@WebParam(name="backout") Boolean backout,
@WebParam(name="enableBridge") Boolean enableBridge,
@@ -138,7 +138,7 @@ public interface MsoVnfAdapter
@WebParam(name="baseVfHeatStackId") @XmlElement(required=false) String baseVfHeatStackId,
@WebParam(name="vfModuleStackId") @XmlElement(required=false) String vfModuleStackId,
@WebParam(name = "modelCustomizationUuid") @XmlElement(required = false) String modelCustomizationUuid,
- @WebParam(name="inputs") Map<String,String> inputs,
+ @WebParam(name="inputs") Map<String,Object> inputs,
@WebParam(name="request") MsoRequest msoRequest,
@WebParam(name="outputs", mode=Mode.OUT) Holder<Map<String,String>> outputs,
@WebParam(name="rollback", mode=Mode.OUT) Holder<VnfRollback> rollback )
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsync.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsync.java
index b67a412c3e..6f61f0292c 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsync.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsync.java
@@ -53,7 +53,7 @@ public interface MsoVnfAdapterAsync
@WebParam(name="vnfName") @XmlElement(required=true) String vnfName,
@WebParam(name="requestType") @XmlElement(required=false) String requestType,
@WebParam(name="volumeGroupHeatStackId") @XmlElement(required=false) String volumeGroupHeatStackId,
- @WebParam(name="inputs") Map<String,String> inputs,
+ @WebParam(name="inputs") Map<String,Object> inputs,
@WebParam(name="failIfExists") Boolean failIfExists,
@WebParam(name="backout") Boolean backout,
@WebParam(name="enableBridge") Boolean enableBridge,
@@ -70,7 +70,7 @@ public interface MsoVnfAdapterAsync
@WebParam(name="vnfName") @XmlElement(required=true) String vnfName,
@WebParam(name="requestType") @XmlElement(required=false) String requestType,
@WebParam(name="volumeGroupHeatStackId") @XmlElement(required=false) String volumeGroupHeatStackId,
- @WebParam(name="inputs") Map<String,String> inputs,
+ @WebParam(name="inputs") Map<String,Object> inputs,
@WebParam(name="messageId") @XmlElement(required=true) String messageId,
@WebParam(name="request") MsoRequest msoRequest,
@WebParam(name="notificationUrl") @XmlElement(required=true) String notificationUrl );
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java
index 6340f76388..2c9d3776a7 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImpl.java
@@ -125,7 +125,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
String vnfName,
String requestType,
String volumeGroupHeatStackId,
- Map <String, String> inputs,
+ Map <String, Object> inputs,
Boolean failIfExists,
Boolean backout,
Boolean enableBridge,
@@ -214,7 +214,7 @@ public class MsoVnfAdapterAsyncImpl implements MsoVnfAdapterAsync {
String vnfName,
String requestType,
String volumeGroupHeatStackId,
- Map <String, String> inputs,
+ Map <String, Object> inputs,
String messageId,
MsoRequest msoRequest,
String notificationUrl) {
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
index 94434cd781..96160760fd 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java
@@ -180,7 +180,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String vnfName,
String requestType,
String volumeGroupHeatStackId,
- Map <String, String> inputs,
+ Map <String, Object> inputs,
Boolean failIfExists,
Boolean backout,
Boolean enableBridge,
@@ -265,7 +265,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String vnfName,
String requestType,
String volumeGroupHeatStackId,
- Map <String, String> inputs,
+ Map <String, Object> inputs,
MsoRequest msoRequest,
Holder <Map <String, String>> outputs,
Holder <VnfRollback> rollback) throws VnfException {
@@ -474,7 +474,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
return stringOutputs;
}
- private Map <String, Object> copyStringInputs (Map <String, String> stringInputs) {
+ private Map <String, Object> copyStringInputs (Map <String, Object> stringInputs) {
return new HashMap <> (stringInputs);
}
@@ -579,7 +579,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String volumeGroupHeatStackId,
String baseVfHeatStackId,
String modelCustomizationUuid,
- Map <String, String> inputs,
+ Map <String, Object> inputs,
Boolean failIfExists,
Boolean backout,
Boolean enableBridge,
@@ -1343,7 +1343,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
String baseVfHeatStackId,
String vfModuleStackId,
String modelCustomizationUuid,
- Map <String, String> inputs,
+ Map <String, Object> inputs,
MsoRequest msoRequest,
Holder <Map <String, String>> outputs,
Holder <VnfRollback> rollback) throws VnfException {
@@ -1794,8 +1794,8 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
hasJson = true;
String jsonString = null;
try {
- jsonString = inputs.get(parm.getParamName());
- jsonNode = new ObjectMapper().readTree(jsonString);
+ jsonString = JSON_MAPPER.writeValueAsString(inputs.get(parm.getParamName()));
+ jsonNode = JSON_MAPPER.readTree(jsonString);
} catch (JsonParseException jpe) {
//TODO - what to do here?
//for now - send the error to debug, but just leave it as a String
@@ -1816,8 +1816,8 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
hasJson = true;
String jsonString = null;
try {
- jsonString = inputs.get(parm.getParamAlias());
- jsonNode = new ObjectMapper().readTree(jsonString);
+ jsonString = (String)inputs.get(parm.getParamAlias());
+ jsonNode = JSON_MAPPER.readTree(jsonString);
} catch (JsonParseException jpe) {
//TODO - what to do here?
//for now - send the error to debug, but just leave it as a String
@@ -1847,7 +1847,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
// They've submitted using an alias name. Remove that from inputs, and add back using real name.
String realParamName = parm.getParamName ();
String alias = parm.getParamAlias ();
- String value = inputs.get (alias);
+ Object value = inputs.get (alias);
LOGGER.debug ("*Found an Alias: paramName=" + realParamName
+ ",alias="
+ alias
@@ -1911,9 +1911,9 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
Map<String, Object> inputsTwo = null;
if (hasJson && jsonParams.size() > 0) {
inputsTwo = new HashMap<>();
- for (Map.Entry<String, String> entry : inputs.entrySet()) {
+ for (Map.Entry<String, Object> entry : inputs.entrySet()) {
String keyParamName = entry.getKey();
- String value = entry.getValue();
+ Object value = entry.getValue();
if (jsonParams.containsKey(keyParamName)) {
inputsTwo.put(keyParamName, jsonParams.get(keyParamName));
} else {
@@ -2085,7 +2085,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
*/
private boolean valetCreateRequest(String cloudSiteId, String tenantId, Map<String, Object> heatFilesObjects, Map<String, Object> nestedTemplatesChecked,
String vfModuleName, boolean backout, HeatTemplate heatTemplate, String newEnvironmentString, Map<String, Object> goldenInputs,
- MsoRequest msoRequest, Map<String, String> inputs, boolean failRequestOnValetFailure, Holder<Map<String, Object>> valetModifiedParamsHolder) throws VnfException {
+ MsoRequest msoRequest, Map<String, Object> inputs, boolean failRequestOnValetFailure, Holder<Map<String, Object>> valetModifiedParamsHolder) throws VnfException {
boolean valetSucceeded = false;
String valetErrorMessage = "more detail not available";
try {
@@ -2095,8 +2095,8 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
HeatRequest heatRequest = new HeatRequest(vfModuleName, backout, heatTemplate.getTimeoutMinutes(),
heatTemplate.getTemplateBody(), newEnvironmentString, files, goldenInputs);
GenericValetResponse<ValetCreateResponse> createReq = this.vci.callValetCreateRequest(msoRequest.getRequestId(),
- cloudSiteId, tenantId, msoRequest.getServiceInstanceId(), inputs.get("vnf_id"),
- inputs.get("vnf_name"), inputs.get("vf_module_id"), inputs.get("vf_module_name"), keystoneUrl,
+ cloudSiteId, tenantId, msoRequest.getServiceInstanceId(), (String)inputs.get("vnf_id"),
+ (String)inputs.get("vnf_name"), (String)inputs.get("vf_module_id"), (String)inputs.get("vf_module_name"), keystoneUrl,
heatRequest);
ValetCreateResponse vcr = createReq.getReturnObject();
if (vcr != null && createReq.getStatusCode() == 200) {
@@ -2145,7 +2145,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
private boolean valetUpdateRequest(String cloudSiteId, String tenantId,
Map<String, Object> heatFilesObjects, Map<String, Object> nestedTemplatesChecked, String vfModuleName,
boolean backout, HeatTemplate heatTemplate, String newEnvironmentString,
- Map<String, Object> goldenInputs, MsoRequest msoRequest, Map<String, String> inputs,
+ Map<String, Object> goldenInputs, MsoRequest msoRequest, Map<String, Object> inputs,
boolean failRequestOnValetFailure, Holder<Map<String, Object>> valetModifiedParamsHolder) throws VnfException {
boolean valetSucceeded = false;
@@ -2158,8 +2158,8 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
heatTemplate.getTemplateBody(), newEnvironmentString, files, goldenInputs);
// vnf name is not sent to MSO on update requests - so we will set it to the vf module name for now
GenericValetResponse<ValetUpdateResponse> updateReq = this.vci.callValetUpdateRequest(msoRequest.getRequestId(),
- cloudSiteId, tenantId, msoRequest.getServiceInstanceId(), inputs.get("vnf_id"),
- vfModuleName, inputs.get("vf_module_id"), vfModuleName, keystoneUrl,
+ cloudSiteId, tenantId, msoRequest.getServiceInstanceId(), (String)inputs.get("vnf_id"),
+ vfModuleName, (String)inputs.get("vf_module_id"), vfModuleName, keystoneUrl,
heatRequest);
ValetUpdateResponse vur = updateReq.getReturnObject();
if (vur != null && updateReq.getStatusCode() == 200) {
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java
index 00e72373dd..f34a79491e 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImpl.java
@@ -132,7 +132,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
String vnfName,
String requestType,
String volumeGroupHeatStackId,
- Map <String, String> inputs,
+ Map <String, Object> inputs,
Boolean failIfExists,
Boolean backout,
Boolean enableBridge,
@@ -160,7 +160,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
String vnfName,
String requestType,
String volumeGroupHeatStackId,
- Map <String, String> inputs,
+ Map <String, Object> inputs,
MsoRequest msoRequest,
Holder <Map <String, String>> outputs,
Holder <VnfRollback> rollback)
@@ -428,7 +428,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
return;
}
- private void sendMapToDebug(Map<String, String> inputs) {
+ private void sendMapToDebug(Map<String, Object> inputs) {
int i = 0;
StringBuilder sb = new StringBuilder("inputs:");
if (inputs == null) {
@@ -567,7 +567,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
String volumeGroupId,
String baseVfModuleId,
String modelCustomizationUuid,
- Map <String, String> inputs,
+ Map <String, Object> inputs,
Boolean failIfExists,
Boolean backout,
Boolean enableBridge,
@@ -605,7 +605,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
if (inputs == null) {
// Create an empty set of inputs
- inputs = new HashMap<String,String>();
+ inputs = new HashMap<>();
LOGGER.debug("inputs == null - setting to empty");
} else {
this.sendMapToDebug(inputs);
@@ -1212,7 +1212,7 @@ public class MsoVnfCloudifyAdapterImpl implements MsoVnfAdapter {
String baseVfHeatStackId,
String vfModuleStackId,
String modelCustomizationUuid,
- Map <String, String> inputs,
+ Map <String, Object> inputs,
MsoRequest msoRequest,
Holder <Map <String, String>> outputs,
Holder <VnfRollback> rollback) throws VnfException
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java
index 09ee0cde04..13212be74a 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java
@@ -155,7 +155,7 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter {
String vnfName,
String requestType,
String volumeGroupHeatStackId,
- Map <String, String> inputs,
+ Map <String, Object> inputs,
Boolean failIfExists,
Boolean backout,
Boolean enableBridge,
@@ -183,7 +183,7 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter {
String vnfName,
String requestType,
String volumeGroupHeatStackId,
- Map <String, String> inputs,
+ Map <String, Object> inputs,
MsoRequest msoRequest,
Holder <Map <String, String>> outputs,
Holder <VnfRollback> rollback)
@@ -379,14 +379,14 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter {
* Normalize an input value to an Object, based on the target parameter type.
* If the type is not recognized, it will just be returned unchanged (as a string).
*/
- private Object convertInputValue (String inputValue, HeatTemplateParam templateParam)
+ private Object convertInputValue (Object inputValue, HeatTemplateParam templateParam)
{
String type = templateParam.getParamType();
LOGGER.debug("Parameter: " + templateParam.getParamName() + " is of type " + type);
if (type.equalsIgnoreCase("number")) {
try {
- return Integer.valueOf(inputValue);
+ return Integer.valueOf(inputValue.toString());
}
catch (Exception e) {
LOGGER.debug("Unable to convert " + inputValue + " to an integer!" , e);
@@ -394,7 +394,7 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter {
}
} else if (type.equalsIgnoreCase("json")) {
try {
- JsonNode jsonNode = new ObjectMapper().readTree(inputValue);
+ JsonNode jsonNode = JSON_MAPPER.readTree(JSON_MAPPER.writeValueAsString(inputValue));
return jsonNode;
}
catch (Exception e) {
@@ -402,7 +402,7 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter {
return null;
}
} else if (type.equalsIgnoreCase("boolean")) {
- return new Boolean(inputValue);
+ return new Boolean(inputValue.toString());
}
// Nothing else matched. Return the original string
@@ -471,7 +471,7 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter {
return;
}
- private void sendMapToDebug(Map<String, String> inputs) {
+ private void sendMapToDebug(Map<String, Object> inputs) {
int i = 0;
StringBuilder sb = new StringBuilder("inputs:");
if (inputs == null) {
@@ -608,7 +608,7 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter {
String volumeGroupId,
String baseVfModuleId,
String modelCustomizationUuid,
- Map <String, String> inputs,
+ Map <String, Object> inputs,
Boolean failIfExists,
Boolean backout,
Boolean enableBridge,
@@ -1212,7 +1212,7 @@ public class MsoVnfPluginAdapterImpl implements MsoVnfAdapter {
String baseVfHeatStackId,
String vfModuleStackId,
String modelCustomizationUuid,
- Map <String, String> inputs,
+ Map <String, Object> inputs,
MsoRequest msoRequest,
Holder <Map <String, String>> outputs,
Holder <VnfRollback> rollback) throws VnfException
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/audit/AuditStackServiceDataTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/audit/AuditStackServiceDataTest.java
index 52b67b8eb9..d7739e56f6 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/audit/AuditStackServiceDataTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/audit/AuditStackServiceDataTest.java
@@ -105,7 +105,7 @@ public class AuditStackServiceDataTest extends AuditStackServiceData {
doReturn(1).when(mockExternalTask).getRetries();
auditStackService.executeExternalTask(mockExternalTask, mockExternalTaskService);
Mockito.verify(mockExternalTaskService).handleBpmnError(mockExternalTask,
- "AuditAAIInventoryFailure", "Number of Retries Exceeded auditing inventory");
+ "AuditAAIInventoryFailure");
}
@Test
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImplTest.java
index 4f1c2c8707..3ebaea9c2c 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImplTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterAsyncImplTest.java
@@ -76,7 +76,7 @@ public class MsoVnfAdapterAsyncImplTest extends BaseRestTestUtils {
String vnfName = "DEV-VF-1802-it3-pwt3-v6-vSAMP10a-addon2-Replace-1001/stackId";
String notificationUrl = "http://localhost:"+wireMockPort+"/notify/adapterNotify/updateVnfNotificationRequest";
instance.createVnfA("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", vnfName, "VFMOD",
- "volumeGroupHeatStackId|1", new HashMap<String, String>(), Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, "messageId",
+ "volumeGroupHeatStackId|1", new HashMap<String, Object>(), Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, "messageId",
msoRequest, notificationUrl);
verify(1,postRequestedFor(urlEqualTo("/notify/adapterNotify/updateVnfNotificationRequest")));
@@ -86,7 +86,7 @@ public class MsoVnfAdapterAsyncImplTest extends BaseRestTestUtils {
public void createVNFTest_Exception() throws Exception {
String notificationUrl = "http://localhost:"+wireMockPort+"/notify/adapterNotify/updateVnfNotificationRequest";
instance.createVnfA("mdt1", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "vSAMP12", "VFMOD",
- "volumeGroupHeatStackId|1", new HashMap<String, String>(), Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, "messageId",
+ "volumeGroupHeatStackId|1", new HashMap<String, Object>(), Boolean.FALSE, Boolean.TRUE, Boolean.FALSE, "messageId",
null, notificationUrl);
verify(1,postRequestedFor(urlEqualTo("/notify/adapterNotify/updateVnfNotificationRequest")));
@@ -99,7 +99,7 @@ public class MsoVnfAdapterAsyncImplTest extends BaseRestTestUtils {
msoRequest.setRequestId("12345");
msoRequest.setServiceInstanceId("12345");
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
stubFor(post(urlPathEqualTo("/notify/adapterNotify/updateVnfNotificationRequest")).withRequestBody
(containing("messageId"))
@@ -116,7 +116,7 @@ public class MsoVnfAdapterAsyncImplTest extends BaseRestTestUtils {
msoRequest.setRequestId("12345");
msoRequest.setServiceInstanceId("12345");
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
stubFor(post(urlPathEqualTo("/notify/adapterNotify/updateVnfNotificationRequest")).withRequestBody
(containing("messageId"))
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterImplTest.java
index 849c0811b0..be3b54e23f 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterImplTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterImplTest.java
@@ -104,7 +104,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
MsoRequest msoRequest = getMsoRequest();
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.createVfModule("MTN13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD",
"volumeGroupHeatStackId|1", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map,
@@ -124,7 +124,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
MsoRequest msoRequest = getMsoRequest();
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD",
"volumeGroupHeatStackId|1", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map,
@@ -144,7 +144,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
MsoRequest msoRequest = getMsoRequest();
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD",
"volumeGroupHeatStackId|1", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map,
@@ -164,7 +164,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
MsoRequest msoRequest = getMsoRequest();
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD",
"volumeGroupHeatStackId|1", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map,
@@ -181,7 +181,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
MsoRequest msoRequest = getMsoRequest();
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD",
"volumeGroupHeatStackId|1", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map,
@@ -195,7 +195,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
expectedException.expect(VnfException.class);
MsoRequest msoRequest = getMsoRequest();
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD",
"volumeGroupHeatStackId|1", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map,
@@ -211,7 +211,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
MsoRequest msoRequest = getMsoRequest();
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD",
"volumeGroupHeatStackId", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map,
@@ -230,7 +230,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
MsoRequest msoRequest = getMsoRequest();
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD",
"volumeGroupHeatStackId", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map,
@@ -250,7 +250,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
MsoRequest msoRequest = getMsoRequest();
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD",
"volumeGroupHeatStackId", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map,
@@ -268,7 +268,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
MsoRequest msoRequest = getMsoRequest();
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD",
"volumeGroupHeatStackId", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map,
@@ -300,7 +300,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
MsoRequest msoRequest = getMsoRequest();
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD",
"volumeGroupHeatStackId", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map,
@@ -337,7 +337,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
MsoRequest msoRequest = getMsoRequest();
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "XVFMOD",
"volumeGroupHeatStackId", "baseVfHeatStackId", null, map,
@@ -355,7 +355,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
MsoRequest msoRequest = getMsoRequest();
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD",
"volumeGroupHeatStackId", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map,
@@ -375,7 +375,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
expectedException.expect(VnfException.class);
MsoRequest msoRequest = getMsoRequest();
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.updateVfModule("mdt1", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "vSAMP12", "VFMOD",
"volumeGroupHeatStackId|1", "baseVfHeatStackId", "vfModuleStackId",
@@ -388,7 +388,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
expectedException.expect(VnfNotFound.class);
MsoRequest msoRequest = getMsoRequest();
mockOpenStackResponseAccess(wireMockPort);
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.updateVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", vnfName, "VFMOD",
"volumeGroupHeatStackId", "baseVfHeatStackId", "vfModuleStackId",
@@ -405,7 +405,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
stubFor(get(urlPathEqualTo("/mockPublicUrl/stacks/volumeGroupHeatStackId"))
.willReturn(aResponse().withHeader("Content-Type", "application/json")
.withStatus(HttpStatus.SC_INTERNAL_SERVER_ERROR)));
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.updateVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", vnfName, "VFMOD",
"volumeGroupHeatStackId", "baseVfHeatStackId", "vfModuleStackId",
@@ -422,7 +422,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
stubFor(get(urlPathEqualTo("/mockPublicUrl/stacks/volumeGroupHeatStackId"))
.willReturn(aResponse().withHeader("Content-Type", "application/json")
.withStatus(HttpStatus.SC_NOT_FOUND)));
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.updateVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", vnfName, "VFMOD",
"volumeGroupHeatStackId", "baseVfHeatStackId", "vfModuleStackId",
@@ -438,7 +438,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
mockOpenStackGetStackVfModule_200();
mockOpenstackGetWithResponse("/mockPublicUrl/stacks/volumeGroupHeatStackId",HttpStatus.SC_OK,"OpenstackResponse_Stack_Created_VfModule.json");
mockOpenstackGetWithResponse("/mockPublicUrl/stacks/baseVfHeatStackId",HttpStatus.SC_INTERNAL_SERVER_ERROR,"OpenstackResponse_Stack_Created_VfModule.json");
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.updateVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", vnfName, "VFMOD",
"volumeGroupHeatStackId", "baseVfHeatStackId", "vfModuleStackId",
@@ -454,7 +454,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
mockOpenStackGetStackVfModule_200();
mockOpenstackGetWithResponse("/mockPublicUrl/stacks/volumeGroupHeatStackId",HttpStatus.SC_OK,"OpenstackResponse_Stack_Created_VfModule.json");
mockOpenstackGetWithResponse("/mockPublicUrl/stacks/baseVfHeatStackId",HttpStatus.SC_NOT_FOUND,"OpenstackResponse_Stack_Created_VfModule.json");
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.updateVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", vnfName, "VFMOD",
"volumeGroupHeatStackId", "baseVfHeatStackId", "vfModuleStackId",
@@ -470,7 +470,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
mockOpenStackGetStackVfModule_200();
mockOpenstackGetWithResponse("/mockPublicUrl/stacks/volumeGroupHeatStackId",HttpStatus.SC_OK,"OpenstackResponse_Stack_Created_VfModule.json");
mockOpenstackGetWithResponse("/mockPublicUrl/stacks/baseVfHeatStackId",HttpStatus.SC_OK,"OpenstackResponse_Stack_Created_VfModule.json");
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.updateVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", vnfName, "VFMOD",
"volumeGroupHeatStackId", "baseVfHeatStackId", "vfModuleStackId",
@@ -489,7 +489,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
VfModuleCustomization vfModuleCustomization = getVfModuleCustomization();
vfModuleCustomization.getVfModule().getModuleHeatTemplate().setParameters(new HashSet<>());
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.updateVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", vnfName, "VFMOD",
"volumeGroupHeatStackId", "baseVfHeatStackId", "vfModuleStackId",
@@ -509,7 +509,7 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
VfModuleCustomization vfModuleCustomization = getVfModuleCustomization();
vfModuleCustomization.getVfModule().getModuleHeatTemplate().setParameters(new HashSet<>());
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
instance.updateVfModule("MTN13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", vnfName, "VFMOD",
"volumeGroupHeatStackId", "baseVfHeatStackId", "vfModuleStackId",
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java
index addc12a5d3..44843900fc 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfCloudifyAdapterImplTest.java
@@ -265,7 +265,7 @@ public class MsoVnfCloudifyAdapterImplTest extends BaseRestTestUtils {
msoRequest.setRequestId("12345");
msoRequest.setServiceInstanceId("12345");
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
try {
instance.createVnf("mdt1", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "vSAMP12", "VFMOD",
@@ -282,7 +282,7 @@ public class MsoVnfCloudifyAdapterImplTest extends BaseRestTestUtils {
msoRequest.setRequestId("12345");
msoRequest.setServiceInstanceId("12345");
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
try {
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java
index 1fd3ffc90a..75cea9eafc 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfMulticloudAdapterImplTest.java
@@ -66,7 +66,7 @@ public class MsoVnfMulticloudAdapterImplTest extends BaseRestTestUtils{
@Test
public void createVfModule() throws Exception {
//expectedException.expect(VnfException.class);
- Map<String, String> stackInputs = new HashMap<>();
+ Map<String, Object> stackInputs = new HashMap<>();
stackInputs.put("oof_directives", "{}");
stackInputs.put("sdnc_directives", "{}");
stackInputs.put("generic_vnf_id", "genVNFID");
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImplTest.java
index a422680d00..0cd3d1a61d 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImplTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImplTest.java
@@ -56,7 +56,7 @@ public class MsoVnfPluginAdapterImplTest extends BaseRestTestUtils {
public void createVfModule_ModelCustUuidIsNull() throws Exception {
expectedException.expect(VnfException.class);
MsoRequest msoRequest = getMsoRequest();
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
msoVnfPluginAdapter.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD",
"volumeGroupHeatStackId|1", "baseVfHeatStackId", null, map,
@@ -68,7 +68,7 @@ public class MsoVnfPluginAdapterImplTest extends BaseRestTestUtils {
public void createVfModule_ModelCustUuidIsNotFound() throws Exception {
expectedException.expect(VnfException.class);
MsoRequest msoRequest = getMsoRequest();
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
msoVnfPluginAdapter.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD",
"volumeGroupHeatStackId|1", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map,
@@ -80,7 +80,7 @@ public class MsoVnfPluginAdapterImplTest extends BaseRestTestUtils {
public void createVfModule_VduException() throws Exception {
expectedException.expect(VnfException.class);
MsoRequest msoRequest = getMsoRequest();
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
msoVnfPluginAdapter.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD",
"volumeGroupHeatStackId|1", "baseVfHeatStackId", "9b339a61-69ca-465f-86b8-1c72c582b8e8", map,
@@ -94,7 +94,7 @@ public class MsoVnfPluginAdapterImplTest extends BaseRestTestUtils {
mockOpenStackGetStackVfModule_200();
MsoRequest msoRequest = getMsoRequest();
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
msoVnfPluginAdapter.createVfModule("MTN13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD",
null, "baseVfHeatStackId", "9b339a61-69ca-465f-86b8-1c72c582b8e8", map,
@@ -107,7 +107,7 @@ public class MsoVnfPluginAdapterImplTest extends BaseRestTestUtils {
expectedException.expect(VnfException.class);
mockOpenStackResponseAccess(wireMockPort);
MsoRequest msoRequest = getMsoRequest();
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
msoVnfPluginAdapter.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD",
"volumeGroupHeatStackId|1", "baseVfHeatStackId", "9b339a61-69ca-465f-86b8-1c72c582b8e8", map,
@@ -125,7 +125,7 @@ public class MsoVnfPluginAdapterImplTest extends BaseRestTestUtils {
.withBodyFile("OpenstackResponse_Stack_Created_VfModule.json")
.withStatus(HttpStatus.SC_OK)));
MsoRequest msoRequest = getMsoRequest();
- Map<String, String> map = new HashMap<>();
+ Map<String, Object> map = new HashMap<>();
map.put("key1", "value1");
msoVnfPluginAdapter.createVfModule("mtn13", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "", "VFMOD",
"volumeGroupHeatStackId", "baseVfHeatStackId", "9b339a61-69ca-465f-86b8-1c72c582b8e8", map,
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VnfAdapterRestTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VnfAdapterRestTest.java
index c502620920..343b6245e6 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VnfAdapterRestTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VnfAdapterRestTest.java
@@ -169,7 +169,7 @@ public class VnfAdapterRestTest extends BaseRestTestUtils {
MsoRequest msoReq = new MsoRequest();
boolean failIfExists = true;
Boolean enableBridge = null;
- Map<String, String> vfModuleParams = new HashMap<String, String>();
+ Map<String, Object> vfModuleParams = new HashMap<>();
vfModuleParams.put("vf_module_id", VF_MODULE_ID);
@@ -236,7 +236,7 @@ public class VnfAdapterRestTest extends BaseRestTestUtils {
MsoRequest msoReq = new MsoRequest();
boolean failIfExists = true;
boolean enableBridge = false;
- Map<String, String> vfModuleParams = new HashMap<String, String>();
+ Map<String, Object> vfModuleParams = new HashMap<>();
vfModuleParams.put("vf_module_id", VF_MODULE_ID);
vfModuleParams.put("vnf_id", AAI_VNF_ID);
@@ -385,7 +385,7 @@ public class VnfAdapterRestTest extends BaseRestTestUtils {
msoRequest.setRequestId(MSO_REQUEST_ID);
msoRequest.setServiceInstanceId(MSO_SERVICE_INSTANCE_ID);
- Map<String, String> vfModuleParams = new HashMap<String, String>();
+ Map<String, Object> vfModuleParams = new HashMap<>();
vfModuleParams.put("exn_direct_net_fqdn", EXN_DIRECT_NET_FQDN);
vfModuleParams.put("exn_hsl_net_fqdn", EXN_HSL_NET_FQDN);
@@ -511,7 +511,7 @@ public class VnfAdapterRestTest extends BaseRestTestUtils {
MsoRequest msoReq = new MsoRequest();
boolean failIfExists = true;
boolean enableBridge = false;
- Map<String, String> vfModuleParams = new HashMap<String, String>();
+ Map<String, Object> vfModuleParams = new HashMap<>();
vfModuleParams.put("vf_module_id", VF_MODULE_ID);
vfModuleParams.put("vnf_id", AAI_VNF_ID);
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VolumeGroupAdapterCommon.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VolumeGroupAdapterCommon.java
index 68982799f1..d0d06aed6c 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VolumeGroupAdapterCommon.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/VolumeGroupAdapterCommon.java
@@ -56,7 +56,7 @@ public class VolumeGroupAdapterCommon extends BaseRestTestUtils {
request.setModelCustomizationUuid(MODEL_CUSTOMIZATION_UUID);
request.setSkipAAI(true);
request.setVolumeGroupStackId(VOUME_GROUP_NAME);
- Map<String, String> volumeGroupParams = getVolumeGroupParamsMap();
+ Map<String, Object> volumeGroupParams = getVolumeGroupParamsMap();
request.setVolumeGroupParams(volumeGroupParams);
MsoRequest msoReq = getMsoRequest();
request.setMsoRequest(msoReq);
@@ -104,7 +104,7 @@ public class VolumeGroupAdapterCommon extends BaseRestTestUtils {
request.setFailIfExists(true);
request.setEnableBridge(false);
request.setSuppressBackout(true);
- Map<String, String> volumeGroupParams = getVolumeGroupParamsMap();
+ Map<String, Object> volumeGroupParams = getVolumeGroupParamsMap();
request.setVolumeGroupParams(volumeGroupParams);
MsoRequest msoReq = getMsoRequest();
request.setMsoRequest(msoReq);
@@ -112,8 +112,8 @@ public class VolumeGroupAdapterCommon extends BaseRestTestUtils {
return request;
}
- private Map<String, String> getVolumeGroupParamsMap() {
- Map<String, String> volumeGroupParams = new HashMap<>();
+ private Map<String, Object> getVolumeGroupParamsMap() {
+ Map<String, Object> volumeGroupParams = new HashMap<>();
volumeGroupParams.put("fsb_volume_type_0","volume_type");
volumeGroupParams.put("fsb_volume_image_name_1","vol_img_1");
volumeGroupParams.put("fsb_volume_image_name_0","vol_img_0");