aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapter-utils
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-adapter-utils')
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java2
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java4
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java4
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoNeutronUtils.java6
-rw-r--r--adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsTest.java18
5 files changed, 17 insertions, 17 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java
index 46cfbf1bb8..c438d0a277 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java
@@ -1436,7 +1436,7 @@ public class MsoHeatUtils extends MsoCommonUtils {
if (inputs == null) {
LOGGER.debug("convertInputMap - inputs is null - nothing to do here");
- return new HashMap<String, Object>();
+ return new HashMap<>();
}
LOGGER.debug("convertInputMap in MsoHeatUtils called, with " + inputs.size() + " inputs, and template " + template.getArtifactUuid());
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java
index 0e0b9cb70d..f7e67d87f8 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java
@@ -230,7 +230,7 @@ public class MsoHeatUtilsWithUpdate extends MsoHeatUtils {
if (haveFiles && haveHeatFiles) {
// Let's do this here - not in the bean
LOGGER.debug ("Found files AND heatFiles - combine and add!");
- Map <String, Object> combinedFiles = new HashMap <String, Object> ();
+ Map <String, Object> combinedFiles = new HashMap<>();
for (String keyString : files.keySet ()) {
combinedFiles.put (keyString, files.get (keyString));
}
@@ -358,7 +358,7 @@ public class MsoHeatUtilsWithUpdate extends MsoHeatUtils {
sb.append("(outputs is empty)");
return sb;
}
- Map<String, Object> outputs = new HashMap<String,Object>();
+ Map<String, Object> outputs = new HashMap<>();
for (Output outputItem : outputList) {
outputs.put(outputItem.getOutputKey(), outputItem.getOutputValue());
}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java
index 714684aba6..3b710032c1 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java
@@ -209,7 +209,7 @@ public class MsoKeystoneUtils extends MsoTenantUtils {
return null;
}
- Map <String, String> metadata = new HashMap <String, String> ();
+ Map <String, String> metadata = new HashMap<>();
if (cloudSite.getIdentityService ().hasTenantMetadata ()) {
OpenStackRequest <Metadata> request = keystoneAdminClient.tenants ().showMetadata (tenant.getId ());
Metadata tenantMetadata = executeAndRecordOpenstackRequest (request, msoProps);
@@ -255,7 +255,7 @@ public class MsoKeystoneUtils extends MsoTenantUtils {
return null;
}
- Map <String, String> metadata = new HashMap <String, String> ();
+ Map <String, String> metadata = new HashMap<>();
if (cloudSite.getIdentityService ().hasTenantMetadata ()) {
OpenStackRequest <Metadata> request = keystoneAdminClient.tenants ().showMetadata (tenant.getId ());
Metadata tenantMetadata = executeAndRecordOpenstackRequest (request, msoProps);
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoNeutronUtils.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoNeutronUtils.java
index c65a715b66..9eba799e18 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoNeutronUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoNeutronUtils.java
@@ -63,7 +63,7 @@ public class MsoNeutronUtils extends MsoCommonUtils
// token will be used until it expires.
//
// The cache key is "tenantId:cloudId"
- private static Map<String,NeutronCacheEntry> neutronClientCache = new HashMap<String,NeutronCacheEntry>();
+ private static Map<String,NeutronCacheEntry> neutronClientCache = new HashMap<>();
// Fetch cloud configuration each time (may be cached in CloudConfig class)
private CloudConfig cloudConfig;
@@ -129,7 +129,7 @@ public class MsoNeutronUtils extends MsoCommonUtils
}
} else if (type == NetworkType.MULTI_PROVIDER) {
if (provider != null && vlans != null && vlans.size() > 0) {
- List<Segment> segments = new ArrayList<Segment>(vlans.size());
+ List<Segment> segments = new ArrayList<>(vlans.size());
for (int vlan : vlans) {
Segment segment = new Segment();
segment.setProviderPhysicalNetwork (provider);
@@ -297,7 +297,7 @@ public class MsoNeutronUtils extends MsoCommonUtils
}
} else if (type == NetworkType.MULTI_PROVIDER) {
if (provider != null && vlans != null && vlans.size() > 0) {
- List<Segment> segments = new ArrayList<Segment>(vlans.size());
+ List<Segment> segments = new ArrayList<>(vlans.size());
for (int vlan : vlans) {
Segment segment = new Segment();
segment.setProviderPhysicalNetwork (provider);
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsTest.java
index 6fd95d5948..c2d4f9ba60 100644
--- a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsTest.java
+++ b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/adapter_utils/tests/MsoHeatUtilsTest.java
@@ -60,7 +60,7 @@ public class MsoHeatUtilsTest extends MsoCommonUtils {
public final void testCreateStackBadCloudConfig()
throws MsoStackAlreadyExists, MsoTenantNotFound, MsoException, MsoCloudSiteNotFound {
try {
- msoHeatUtils.createStack("DOESNOTEXIST", "test", "stackName", "test", new HashMap<String, Object>(),
+ msoHeatUtils.createStack("DOESNOTEXIST", "test", "stackName", "test", new HashMap<>(),
Boolean.TRUE, 10);
} catch (MsoCloudSiteNotFound e) {
@@ -74,7 +74,7 @@ public class MsoHeatUtilsTest extends MsoCommonUtils {
public final void testCreateStackFailedConnectionHeatClient()
throws MsoStackAlreadyExists, MsoTenantNotFound, MsoException, MsoCloudSiteNotFound {
try {
- msoHeatUtils.createStack("MT", "test", "stackName", "test", new HashMap<String, Object>(), Boolean.TRUE,
+ msoHeatUtils.createStack("MT", "test", "stackName", "test", new HashMap<>(), Boolean.TRUE,
10);
} catch (MsoIOException e) {
@@ -86,7 +86,7 @@ public class MsoHeatUtilsTest extends MsoCommonUtils {
public final void testCreateStackFailedConnection()
throws MsoStackAlreadyExists, MsoTenantNotFound, MsoException, MsoCloudSiteNotFound {
try {
- msoHeatUtils.createStack("MT", "test", "stackName", "test", new HashMap<String, Object>(), Boolean.TRUE,
+ msoHeatUtils.createStack("MT", "test", "stackName", "test", new HashMap<>(), Boolean.TRUE,
10);
} catch (MsoIOException e) {
@@ -97,7 +97,7 @@ public class MsoHeatUtilsTest extends MsoCommonUtils {
@Test
public final void createStackSuccessWithEnvironment() throws MsoException {
try {
- msoHeatUtils.createStack("MT", "test", "stackName", "test", new HashMap<String, Object>(), Boolean.TRUE, 10,
+ msoHeatUtils.createStack("MT", "test", "stackName", "test", new HashMap<>(), Boolean.TRUE, 10,
"environment");
} catch (MsoIOException e) {
@@ -108,8 +108,8 @@ public class MsoHeatUtilsTest extends MsoCommonUtils {
@Test
public final void createStackSuccessWithFiles() throws MsoException {
try {
- msoHeatUtils.createStack("MT", "test", "stackName", "test", new HashMap<String, Object>(), Boolean.TRUE, 10,
- "environment", new HashMap<String, Object>());
+ msoHeatUtils.createStack("MT", "test", "stackName", "test", new HashMap<>(), Boolean.TRUE, 10,
+ "environment", new HashMap<>());
} catch (MsoIOException e) {
}
@@ -119,8 +119,8 @@ public class MsoHeatUtilsTest extends MsoCommonUtils {
@Test
public final void createStackSuccessWithHeatFiles() throws MsoException {
try {
- msoHeatUtils.createStack("MT", "test", "stackName", "test", new HashMap<String, Object>(), Boolean.TRUE, 10,
- "environment", new HashMap<String, Object>(), new HashMap<String, Object>());
+ msoHeatUtils.createStack("MT", "test", "stackName", "test", new HashMap<>(), Boolean.TRUE, 10,
+ "environment", new HashMap<>(), new HashMap<>());
} catch (MsoIOException e) {
}
@@ -131,7 +131,7 @@ public class MsoHeatUtilsTest extends MsoCommonUtils {
CreateStackParam param = new CreateStackParam();
param.setDisableRollback(false);
param.setEnvironment("environment");
- param.setFiles(new HashMap<String, Object>());
+ param.setFiles(new HashMap<>());
param.setParameters(new HashMap<>());
param.setStackName("stackName");
param.setTemplate("template");