aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcinrzepeckiwroc <marcin.rzepecki@nokia.com>2020-11-04 10:10:52 +0100
committermarcinrzepeckiwroc <marcin.rzepecki@nokia.com>2020-11-06 11:35:35 +0100
commitbb819501be5eab896e5274dfab0149487ccc25b7 (patch)
tree96599ef3e2e4d4d4ea5cb114e61313be8959688f
parent9e49f2787a413b49ab0274e9ce8aebe9e6dc155b (diff)
Remove unnecessary vserver--generic-vnf relation from SO-OpenStack-Adapter implementation
Issue-ID: SO-3363 Signed-off-by: marcinrzepeckiwroc <marcin.rzepecki@nokia.com> Change-Id: I662eba1cafab6778247d491e8f4f45aefe800627
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java5
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java8
2 files changed, 5 insertions, 8 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 32d8f1204c..fef7b5e6cb 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
@@ -103,11 +103,6 @@ public class AaiHelper {
relationships.add(pserverRelationship);
}
- // vserver to generic-vnf relationship
- Relationship genericVnfRelationship = buildRelationship(
- AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(genericVnfId)));
- relationships.add(genericVnfRelationship);
-
// vserver to vnfc relationship
if (!StringUtils.isEmpty(server.getName())) {
relationships.add(createVnfRelationshiptoVserver(server.getName(), genericVnfId, vfModuleId));
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 93a7992338..1026284470 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
@@ -172,6 +172,8 @@ public class HeatBridgeImplTest {
when(resourcesClient.beginSingleTransaction()).thenReturn(transaction);
}
+
+
@Test
public void testExtractStackResourceIdsByResourceType() throws HeatBridgeException {
// Arrange
@@ -369,15 +371,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(4, 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(3, 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(3, relList3.getRelationship().size());
+ assertEquals(2, relList3.getRelationship().size());
}