aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters/src/main/java/org
diff options
context:
space:
mode:
authorErol Ozcan (Argela) <erol.ozcan@argela.com.tr>2023-09-07 17:44:29 +0300
committerErol Ozcan (Argela) <erol.ozcan@argela.com.tr>2023-09-07 18:01:52 +0300
commita47cec3b1cd56342c3e5c16b1390d92a3a17c7f8 (patch)
treed27177bbec9326ad107a5317000656836192082e /adapters/mso-openstack-adapters/src/main/java/org
parentcb5e24fc0e7bab88f4c8c3ae0a8e9ffa28ba9670 (diff)
fix to missing property volume-selflink errorlondon
Issue-ID: SO-4116 Change-Id: Iae4be5dccf1171b9a320a33a4d05201fd6073d47 Signed-off-by: Erol Ozcan (Argela) <erol.ozcan@argela.com.tr>
Diffstat (limited to 'adapters/mso-openstack-adapters/src/main/java/org')
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java3
1 files changed, 3 insertions, 0 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 1bf4aff8f6..9074d09773 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
@@ -447,6 +447,9 @@ public class HeatBridgeImpl implements HeatBridgeApi {
if (vserver.isPresent()) {
Volume volume = new Volume();
volume.setVolumeId(r.getPhysicalResourceId());
+ r.getLinks().stream()
+ .filter(link -> link.getRel().equals(HeatBridgeConstants.OS_RESOURCES_SELF_LINK_KEY))
+ .findFirst().ifPresent(link -> volume.setVolumeSelflink(link.getHref()));
AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure()
.cloudRegion(cloudOwner, cloudRegionId).tenant(tenantId).vserver(vserver.get().getServerId())
.volume(r.getPhysicalResourceId()));