From c4e6325326b32a5b09ef7a92fb4a91fd3b31a377 Mon Sep 17 00:00:00 2001 From: "Smokowski, Steven" Date: Mon, 13 Jul 2020 18:05:00 -0400 Subject: Create vserver if not exists Create vserver if not exists Fix broken unit tests on vserver Issue-ID: SO-3065 Signed-off-by: Benjamin, Max (mb388a) Change-Id: I9ef64045443032083b49d71b38d35d30e85ae50a --- .../src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'adapters/mso-openstack-adapters/src/main') 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 a3d096e627..3f5d25b93f 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 @@ -256,8 +256,8 @@ public class HeatBridgeImpl implements HeatBridgeApi { // Build vserver relationships to: image, flavor, pserver, vf-module vserver.setRelationshipList( aaiHelper.getVserverRelationshipList(cloudOwner, cloudRegionId, genericVnfId, vfModuleId, server)); - transaction.create(AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, cloudOwner, cloudRegionId, - tenantId, vserver.getVserverId()), vserver); + transaction.createIfNotExists(AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, cloudOwner, + cloudRegionId, tenantId, vserver.getVserverId()), Optional.of(vserver)); }); } -- cgit 1.2.3-korg