summaryrefslogtreecommitdiffstats
path: root/adapters/mso-vnf-adapter/src
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-vnf-adapter/src')
-rw-r--r--adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java4
-rwxr-xr-xadapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/vdu/utils/VduInfo.java4
-rw-r--r--adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/MsoVnfAdapterAsyncImplTest.java2
-rw-r--r--adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/MsoVnfAdapterImplTest.java10
-rw-r--r--adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/QueryTest.java24
-rw-r--r--adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/VnfCreateTest.java8
-rw-r--r--adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/VnfQueryTest.java8
-rw-r--r--adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/vdu/utils/VduBlueprintTest.java4
8 files changed, 32 insertions, 32 deletions
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java
index 95e62a0e2d..c2108a0d0c 100644
--- a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java
+++ b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java
@@ -295,7 +295,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
vnfExists.value = Boolean.FALSE;
status.value = VnfStatus.NOTFOUND;
vnfId.value = null;
- outputs.value = new HashMap <String, String> (); // Return as an empty map
+ outputs.value = new HashMap<>(); // Return as an empty map
LOGGER.debug ("VNF " + vnfName + " not found");
} else {
@@ -548,7 +548,7 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
if (objectMap == null) {
return null;
}
- Map<String, String> stringMap = new HashMap<String, String>();
+ Map<String, String> stringMap = new HashMap<>();
for (String key : objectMap.keySet()) {
if (!stringMap.containsKey(key)) {
Object obj = objectMap.get(key);
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/vdu/utils/VduInfo.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/vdu/utils/VduInfo.java
index 53300c9453..3646b292c5 100755
--- a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/vdu/utils/VduInfo.java
+++ b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/vdu/utils/VduInfo.java
@@ -35,8 +35,8 @@ public class VduInfo {
private String vduInstanceId = "";
private String vduInstanceName = "";
private VduStatus status = VduStatus.NOTFOUND;
- private Map<String,Object> outputs = new HashMap<String,Object>();
- private Map<String,Object> inputs = new HashMap<String,Object>();
+ private Map<String,Object> outputs = new HashMap<>();
+ private Map<String,Object> inputs = new HashMap<>();
private String lastAction;
private String actionStatus;
private String errorMessage;
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/MsoVnfAdapterAsyncImplTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/MsoVnfAdapterAsyncImplTest.java
index a045b00699..acde3153ab 100644
--- a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/MsoVnfAdapterAsyncImplTest.java
+++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/MsoVnfAdapterAsyncImplTest.java
@@ -44,7 +44,7 @@ public class MsoVnfAdapterAsyncImplTest {
try {
instance.createVnfA("mdt1", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "vSAMP12", "VFMOD",
- "volumeGroupHeatStackId|1", new HashMap<String, String>(), Boolean.FALSE, Boolean.TRUE, "messageId",
+ "volumeGroupHeatStackId|1", new HashMap<>(), Boolean.FALSE, Boolean.TRUE, "messageId",
null, "http://org.openecomp.mso/notify/adapterNotify/updateVnfNotificationRequest");
} catch (Exception e) {
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/MsoVnfAdapterImplTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/MsoVnfAdapterImplTest.java
index 6f01954db3..eec2257c7f 100644
--- a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/MsoVnfAdapterImplTest.java
+++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/MsoVnfAdapterImplTest.java
@@ -48,8 +48,8 @@ public class MsoVnfAdapterImplTest {
try {
instance.createVfModule("mdt1", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "vSAMP12", "VFMOD",
"volumeGroupHeatStackId|1", "baseVfHeatStackId", "88a6ca3ee0394ade9403f075db23167e", map,
- Boolean.FALSE, Boolean.TRUE, msoRequest, new Holder<>(), new Holder<Map<String, String>>(),
- new Holder<VnfRollback>());
+ Boolean.FALSE, Boolean.TRUE, msoRequest, new Holder<>(), new Holder<>(),
+ new Holder<>());
} catch (Exception e) {
}
@@ -67,8 +67,8 @@ public class MsoVnfAdapterImplTest {
try {
instance.updateVfModule("mdt1", "88a6ca3ee0394ade9403f075db23167e", "vnf", "1", "vSAMP12", "VFMOD",
"volumeGroupHeatStackId|1", "baseVfHeatStackId", "vfModuleStackId",
- "88a6ca3ee0394ade9403f075db23167e", map, msoRequest, new Holder<Map<String, String>>(),
- new Holder<VnfRollback>());
+ "88a6ca3ee0394ade9403f075db23167e", map, msoRequest, new Holder<>(),
+ new Holder<>());
} catch (Exception e) {
}
@@ -82,7 +82,7 @@ public class MsoVnfAdapterImplTest {
msoRequest.setServiceInstanceId("12345");
try {
instance.deleteVfModule("mdt1", "88a6ca3ee0394ade9403f075db23167e", "vSAMP12", msoRequest,
- new Holder<Map<String, String>>());
+ new Holder<>());
} catch (Exception e) {
}
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/QueryTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/QueryTest.java
index f6e79e12a0..d898a6547e 100644
--- a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/QueryTest.java
+++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/QueryTest.java
@@ -55,10 +55,10 @@ public class QueryTest {
String cloudId = "MT";
String tenantId = "MSO_Test";
String vnfName = "VNF_TEST1";
- Holder<Boolean> vnfExists = new Holder<Boolean>();
- Holder<String> vnfId = new Holder<String>();
- Holder<VnfStatus> status = new Holder<VnfStatus>();
- Holder<Map<String, String>> outputs = new Holder<Map<String, String>>();
+ Holder<Boolean> vnfExists = new Holder<>();
+ Holder<String> vnfId = new Holder<>();
+ Holder<VnfStatus> status = new Holder<>();
+ Holder<Map<String, String>> outputs = new Holder<>();
vnfAdapter.queryVnf(cloudId, tenantId, vnfName, null,
vnfExists, vnfId, status, outputs);
@@ -82,10 +82,10 @@ public class QueryTest {
String cloudId = "MT";
String tenantId = "MSO_Test";
String vnfName = "VNF_TEST1";
- Holder<Boolean> vnfExists = new Holder<Boolean>();
- Holder<String> vnfId = new Holder<String>();
- Holder<VnfStatus> status = new Holder<VnfStatus>();
- Holder<Map<String, String>> outputs = new Holder<Map<String, String>>();
+ Holder<Boolean> vnfExists = new Holder<>();
+ Holder<String> vnfId = new Holder<>();
+ Holder<VnfStatus> status = new Holder<>();
+ Holder<Map<String, String>> outputs = new Holder<>();
vnfAdapter.queryVnf(cloudId, tenantId, vnfName, null,
vnfExists, vnfId, status, outputs);
@@ -101,10 +101,10 @@ public class QueryTest {
String cloudId = "MT";
String tenantId = "MSO_Test";
String vnfName = "VNF_TEST1";
- Holder<Boolean> vnfExists = new Holder<Boolean>();
- Holder<String> vnfId = new Holder<String>();
- Holder<VnfStatus> status = new Holder<VnfStatus>();
- Holder<Map<String, String>> outputs = new Holder<Map<String, String>>();
+ Holder<Boolean> vnfExists = new Holder<>();
+ Holder<String> vnfId = new Holder<>();
+ Holder<VnfStatus> status = new Holder<>();
+ Holder<Map<String, String>> outputs = new Holder<>();
vnfAdapter.queryVnf(cloudId, tenantId, vnfName, null,
vnfExists, vnfId, status, outputs);
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/VnfCreateTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/VnfCreateTest.java
index 52e1797531..000ed8aef3 100644
--- a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/VnfCreateTest.java
+++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/VnfCreateTest.java
@@ -42,16 +42,16 @@ public class VnfCreateTest {
String tenantName = "John_Test";
String vnfType = "ApacheDemo";
String vnfName = "AdapterTest";
- Map<String,String> inputs = new HashMap<String,String>();
+ Map<String,String> inputs = new HashMap<>();
inputs.put("vnf_id", "abc");
inputs.put("extra", "whocares");
inputs.put("private_subnet_gateway", "10.4.1.1");
inputs.put("private_subnet_cidr", "10.4.1.0/29");
// Web Service Outputs
- Holder<String> vnfId = new Holder<String>();
- Holder<Map<String,String>> outputs = new Holder<Map<String,String>>();
- Holder<VnfRollback> vnfRollback = new Holder<VnfRollback>();
+ Holder<String> vnfId = new Holder<>();
+ Holder<Map<String,String>> outputs = new Holder<>();
+ Holder<VnfRollback> vnfRollback = new Holder<>();
try {
vnfAdapter.createVnf(cloudId, tenantName, vnfType,null, vnfName, null, null, inputs, false, true, null,
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/VnfQueryTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/VnfQueryTest.java
index 84f2f2ff57..bbffddfd15 100644
--- a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/VnfQueryTest.java
+++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/adapters/vnf/test/VnfQueryTest.java
@@ -39,10 +39,10 @@ public class VnfQueryTest {
String cloudId = "MT";
String tenantId = "MSO_Test";
String vnfName = "VNF_TEST1";
- Holder<Boolean> vnfExists = new Holder<Boolean>();
- Holder<String> vnfId = new Holder<String>();
- Holder<VnfStatus> status = new Holder<VnfStatus>();
- Holder<Map<String,String>> outputs = new Holder<Map<String,String>>();
+ Holder<Boolean> vnfExists = new Holder<>();
+ Holder<String> vnfId = new Holder<>();
+ Holder<VnfStatus> status = new Holder<>();
+ Holder<Map<String,String>> outputs = new Holder<>();
try {
vnfAdapter.queryVnf(cloudId, tenantId, vnfName, null,
diff --git a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/vdu/utils/VduBlueprintTest.java b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/vdu/utils/VduBlueprintTest.java
index 21a71ccf61..019ae1e3f9 100644
--- a/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/vdu/utils/VduBlueprintTest.java
+++ b/adapters/mso-vnf-adapter/src/test/java/org/openecomp/mso/vdu/utils/VduBlueprintTest.java
@@ -60,7 +60,7 @@ public class VduBlueprintTest {
@Test
public void testGetTemplateFiles() {
byte[] templateFileData = "some template file data".getBytes();
- templateFiles = new HashMap<String, byte[]>();
+ templateFiles = new HashMap<>();
templateFiles.put("templateKey1", templateFileData);
vduBlueprint.setTemplateFiles(templateFiles);
Assert.assertNotNull(vduBlueprint.getTemplateFiles());
@@ -71,7 +71,7 @@ public class VduBlueprintTest {
@Test
public void testGetAttachedFiles() {
byte[] attachedFileData = "some file data".getBytes();
- attachedFiles = new HashMap<String, byte[]>();
+ attachedFiles = new HashMap<>();
attachedFiles.put("attachedKey1", attachedFileData);
vduBlueprint.setAttachedFiles(attachedFiles);
Assert.assertNotNull(vduBlueprint.getAttachedFiles());