summaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters/src/main/java
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2020-10-21 19:04:01 +0000
committerGerrit Code Review <gerrit@onap.org>2020-10-21 19:04:01 +0000
commitc3cb2537fe0e4d6bd23dd77a4369705a76e6930a (patch)
treec92c726507a76cc1333956658e30dca78408bbe9 /adapters/mso-openstack-adapters/src/main/java
parenteb00f2d1bbc80fb858f15a565a54fa8336c6650d (diff)
parentb60470ebdd206c190c7ca29d294670ec5f9744b4 (diff)
Merge "Update code to filter null or empty images"
Diffstat (limited to 'adapters/mso-openstack-adapters/src/main/java')
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java
index 6a62a5de61..45b29244d1 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java
@@ -245,7 +245,7 @@ public class HeatBridgeImpl implements HeatBridgeApi {
@Override
public List<org.openstack4j.model.compute.Image> extractOpenstackImagesFromServers(final List<Server> servers) {
Objects.requireNonNull(osClient, ERR_MSG_NULL_OS_CLIENT);
- return servers.stream().map(Server::getImage)
+ return servers.stream().filter(s -> s.getImage() != null).map(Server::getImage)
.filter(distinctByProperty(org.openstack4j.model.compute.Image::getId)).collect(Collectors.toList());
}