aboutsummaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java
index 137aaa9f41..d8a876016f 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java
@@ -84,11 +84,13 @@ public class AaiHelper {
relationships.add(vfModuleRelationship);
// vserver to image relationship
- Relationship imageRel = buildRelationship(HeatBridgeConstants.AAI_IMAGE,
- ImmutableMap.<String, String>builder().put(HeatBridgeConstants.AAI_CLOUD_OWNER, cloudOwner)
- .put(HeatBridgeConstants.AAI_CLOUD_REGION_ID, cloudRegionId)
- .put(HeatBridgeConstants.AAI_IMAGE_ID, server.getImage().getId()).build());
- relationships.add(imageRel);
+ if (server.getImage() != null) {
+ Relationship imageRel = buildRelationship(HeatBridgeConstants.AAI_IMAGE,
+ ImmutableMap.<String, String>builder().put(HeatBridgeConstants.AAI_CLOUD_OWNER, cloudOwner)
+ .put(HeatBridgeConstants.AAI_CLOUD_REGION_ID, cloudRegionId)
+ .put(HeatBridgeConstants.AAI_IMAGE_ID, server.getImage().getId()).build());
+ relationships.add(imageRel);
+ }
// vserver to flavor relationship
Relationship flavorRel = buildRelationship(HeatBridgeConstants.AAI_FLAVOR,