summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2020-05-07 11:19:38 +0000
committerGerrit Code Review <gerrit@onap.org>2020-05-07 11:19:38 +0000
commite49f8206be943065f8f877e1f4d070ecc583866c (patch)
treeb5860ef41981c143eb1614fda0bb18023424feee
parent35575d4a9ba1d8d7c4a987b8de31ad391b8ff71b (diff)
parent2f0dd823704cd9059be3bf61d414e1f8bddd269a (diff)
Merge "updated code with parallel streams to normal"
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/ServiceMapper.java7
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/audit/HeatStackAudit.java2
2 files changed, 4 insertions, 5 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/ServiceMapper.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/ServiceMapper.java
index e74663dbba..09c790cc6a 100644
--- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/ServiceMapper.java
+++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/ServiceMapper.java
@@ -68,7 +68,7 @@ public class ServiceMapper {
private List<Vnf> mapVnfs(org.onap.so.db.catalog.beans.Service service, int depth) {
List<Vnf> vnfs = new ArrayList<>();
logger.info("Vnf Count : {}", service.getVnfCustomizations().size());
- service.getVnfCustomizations().parallelStream().forEach(vnf -> vnfs.add(mapVnf(vnf, depth)));
+ service.getVnfCustomizations().stream().forEach(vnf -> vnfs.add(mapVnf(vnf, depth)));
return vnfs;
}
@@ -104,7 +104,7 @@ public class ServiceMapper {
private List<VfModule> mapVfModules(VnfResourceCustomization vnfResourceCustomization, int depth) {
List<VfModule> vfModules = new ArrayList<>();
- vnfResourceCustomization.getVfModuleCustomizations().parallelStream()
+ vnfResourceCustomization.getVfModuleCustomizations().stream()
.forEach(vfModule -> vfModules.add(mapVfModule(vfModule, depth)));
return vfModules;
}
@@ -133,8 +133,7 @@ public class ServiceMapper {
private List<Cvnfc> mapCvnfcs(VfModuleCustomization vfModuleCustomization) {
List<Cvnfc> cvnfcs = new ArrayList<>();
- vfModuleCustomization.getCvnfcCustomization().parallelStream()
- .forEach(cvnfcCust -> cvnfcs.add(mapCvnfcCus(cvnfcCust)));
+ vfModuleCustomization.getCvnfcCustomization().stream().forEach(cvnfcCust -> cvnfcs.add(mapCvnfcCus(cvnfcCust)));
return cvnfcs;
}
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/audit/HeatStackAudit.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/audit/HeatStackAudit.java
index ed45346131..3ff15ffe2f 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/audit/HeatStackAudit.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/audit/HeatStackAudit.java
@@ -288,7 +288,7 @@ public class HeatStackAudit {
*/
protected List<Optional<Port>> retrieveNeutronPortDetails(Resources resources, String cloudSiteId,
String tenantId) {
- return resources.getList().parallelStream().filter(resource -> "OS::Neutron::Port".equals(resource.getType()))
+ return resources.getList().stream().filter(resource -> "OS::Neutron::Port".equals(resource.getType()))
.map(resource -> neutron.getNeutronPort(resource.getPhysicalResourceId(), tenantId, cloudSiteId))
.collect(Collectors.toList());