aboutsummaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-11-04 14:48:02 +0000
committerGerrit Code Review <gerrit@onap.org>2019-11-04 14:48:02 +0000
commitc7808c6ba90b621a96061337ce6b0811b636fa1a (patch)
treedf46ecc50e890cbd56d887f84e1069b3a5d7a721 /adapters
parent9941efb55c1745ff9d8dab9a781cd1cd9050c8f3 (diff)
parentf56de32112c5769c0174623a5cc9ab829cdc94a8 (diff)
Merge "- Check if failIfExists exists, if not default it."
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfAdapterImpl.java3
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/vnf/MsoVnfAdapterImplTest.java14
2 files changed, 17 insertions, 0 deletions
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 2769f1c9b8..9adcdcb47a 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
@@ -1074,6 +1074,9 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
if (backout == null) {
backout = true;
}
+ if (failIfExists == null) {
+ failIfExists = false;
+ }
if (msoHeatUtils != null) {
heatStack = msoHeatUtils.createStack(cloudSiteId, cloudOwner, tenantId, vfModuleName, null,
template, goldenInputs, true, heatTemplate.getTimeoutMinutes(), newEnvironmentString,
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 0d972bb4d2..f3cad76c9d 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
@@ -85,6 +85,20 @@ public class MsoVnfAdapterImplTest extends BaseRestTestUtils {
}
@Test
+ public void createVnfTest_NullFailIfExists() throws Exception {
+ mockOpenStackResponseAccess(wireMockServer, wireMockPort);
+ mockOpenStackGetStackVfModule_200(wireMockServer);
+
+ MsoRequest msoRequest = getMsoRequest();
+
+ Map<String, Object> map = new HashMap<>();
+ map.put("key1", "value1");
+ instance.createVfModule("mtn13", "CloudOwner", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "", vnfName, "",
+ "VFMOD", null, null, "b4ea86b4-253f-11e7-93ae-92361f002671", map, null, Boolean.TRUE, Boolean.FALSE,
+ msoRequest, new Holder<>(), new Holder<Map<String, String>>(), new Holder<VnfRollback>());
+ }
+
+ @Test
public void createVnfTest_HeatStatusFailed() throws Exception {
mockOpenStackResponseAccess(wireMockServer, wireMockPort);
wireMockServer.stubFor(get(