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.java7
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java6
2 files changed, 9 insertions, 4 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 f18279d5d3..90f55dcbb5 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
@@ -62,7 +62,7 @@ import org.openstack4j.model.network.Port;
public class AaiHelper {
/**
- * Build vserver relationship object to entities: pserver, vf-module, image, flavor
+ * Build vserver relationship object to entities: pserver, vf-module, generic-vnf, image, flavor
*
* @param cloudOwner AAI cloudOwner value
* @param cloudRegionId AAI cloud-region identifier
@@ -88,6 +88,11 @@ public class AaiHelper {
.put(HeatBridgeConstants.AAI_VF_MODULE_ID, vfModuleId).build());
relationships.add(vfModuleRelationship);
+ // vserver to generic-vnf relationship
+ Relationship genericVnfRelationship = buildRelationship(HeatBridgeConstants.AAI_GENERIC_VNF, ImmutableMap
+ .<String, String>builder().put(HeatBridgeConstants.AAI_GENERIC_VNF_ID, genericVnfId).build());
+ relationships.add(genericVnfRelationship);
+
// vserver to image relationship
if (server.getImage() != null) {
Relationship imageRel = buildRelationship(HeatBridgeConstants.AAI_IMAGE,
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java
index 988e78b9a3..302af268d3 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java
@@ -320,15 +320,15 @@ public class HeatBridgeImplTest {
org.onap.aai.domain.yang.RelationshipList relList = aaiHelper.getVserverRelationshipList(CLOUD_OWNER, REGION_ID,
"test-genericVnf-id", "test-vfModule-id", server1);
- assertEquals(2, relList.getRelationship().size());
+ assertEquals(3, relList.getRelationship().size());
org.onap.aai.domain.yang.RelationshipList relList2 = aaiHelper.getVserverRelationshipList(CLOUD_OWNER,
REGION_ID, "test-genericVnf-id", "test-vfModule-id", server2);
- assertEquals(1, relList2.getRelationship().size());
+ assertEquals(2, relList2.getRelationship().size());
org.onap.aai.domain.yang.RelationshipList relList3 = aaiHelper.getVserverRelationshipList(CLOUD_OWNER,
REGION_ID, "test-genericVnf-id", "test-vfModule-id", server3);
- assertEquals(1, relList3.getRelationship().size());
+ assertEquals(2, relList3.getRelationship().size());
}
@Test