aboutsummaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2020-11-02 15:19:54 +0000
committerGerrit Code Review <gerrit@onap.org>2020-11-02 15:19:54 +0000
commit213242ead8446a1dc415be281a82d548dd15294b (patch)
treebcf3600884823c6847b8fbc5cdd1619608fec2b5 /adapters
parent39f149a33356ea0759d07a65e211dc3ffbab885c (diff)
parent88aa0c2fc7965cb6c4b167938157b8269548ab3f (diff)
Merge "Update to not create VNFC relationship"
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java5
-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
3 files changed, 3 insertions, 15 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 c8cb8d9731..5f17f3ca38 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
@@ -328,11 +328,6 @@ public class HeatBridgeImpl implements HeatBridgeApi {
.cloudRegion(cloudOwner, cloudRegionId).tenant(tenantId).vserver(vserver.getVserverId()));
if (resourcesClient.exists(vserverUri)) {
AAIResultWrapper existingVserver = resourcesClient.get(vserverUri);
- if (!existingVserver.hasRelationshipsTo(Types.VNFC)) {
- AAIResourceUri vnfcUri =
- AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().vnfc(server.getName()));
- transaction.connect(vserverUri, vnfcUri);
- }
if (!existingVserver.hasRelationshipsTo(Types.VF_MODULE)) {
AAIResourceUri vfModuleUri = AAIUriFactory.createResourceUri(
AAIFluentTypeBuilder.network().genericVnf(genericVnfId).vfModule(vfModuleId));
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 c1a97cefc4..8e6f8cc69b 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
@@ -92,13 +92,6 @@ public class AaiHelper {
AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(genericVnfId)));
relationships.add(genericVnfRelationship);
- // vserver to vnfc relationship
- if (!StringUtils.isEmpty(server.getName())) {
- Relationship vnfcRelationship = buildRelationship(
- AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().vnfc(server.getName())));
- relationships.add(vnfcRelationship);
- }
-
// vserver to vf-module relationship
Relationship vfModuleRelationship = buildRelationship(AAIUriFactory
.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(genericVnfId).vfModule(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 309a143e32..7912bceede 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
@@ -297,15 +297,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());
}