summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKalkere Ramesh, Sharan <sk720x@att.com>2020-12-18 14:51:22 -0500
committerLukasz Rajewski <lukasz.rajewski@orange.com>2020-12-21 07:43:10 +0000
commit1373de8aaefd4790f63ee1e4386d682ea3a08209 (patch)
tree1ca1bfc0c5a420f561d82ba9cbc176771adb2530
parent97b0c3d3236b7b474bd7ece49ed7b89a9ccf7049 (diff)
skip delete heatbridge when multicloud orchestrator
Issue-ID: SO-3431 Change-Id: I212a38ae39128f538441e71935336db82ebdf351 Signed-off-by: Kalkere Ramesh, Sharan <sk720x@att.com> (cherry picked from commit 8a9734228ed8ad9b7e4bfe2486895647e20a5d77)
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/DeleteAAIInventory.java6
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java4
2 files changed, 9 insertions, 1 deletions
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/DeleteAAIInventory.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/DeleteAAIInventory.java
index f5a6355529..f904788de3 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/DeleteAAIInventory.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/DeleteAAIInventory.java
@@ -48,10 +48,16 @@ public class DeleteAAIInventory {
@Autowired
protected Environment env;
+ private static final String MULTICLOUD_MODE = "MULTICLOUD";
+
public void heatbridge(CloudInformation cloudInformation) throws MsoCloudSiteNotFound, HeatBridgeException {
logger.debug("Heatbridge delete executing");
CloudSite cloudSite = cloudConfig.getCloudSite(cloudInformation.getRegionId())
.orElseThrow(() -> new MsoCloudSiteNotFound(cloudInformation.getRegionId()));
+ if (cloudSite.getOrchestrator() != null && MULTICLOUD_MODE.equalsIgnoreCase(cloudSite.getOrchestrator())) {
+ logger.debug("Skipping Heatbridge as CloudSite orchestrator is: " + MULTICLOUD_MODE);
+ return;
+ }
CloudIdentity cloudIdentity = cloudSite.getIdentityService();
HeatBridgeApi heatBridgeClient = new HeatBridgeImpl(new AAIResourcesClient(), cloudIdentity,
cloudInformation.getOwner(), cloudInformation.getRegionId(), cloudSite.getRegionId(),
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java
index 6b979833eb..58c43be36a 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/vnf/MsoVnfPluginAdapterImpl.java
@@ -1120,7 +1120,9 @@ public class MsoVnfPluginAdapterImpl {
long subStartTime = System.currentTimeMillis();
try {
// TODO: Get an appropriate timeout value - require access to the model
- vduPlugin.deleteVdu(cloudInfo, vfModuleId, 5);
+ if (!vduInstance.getStatus().getState().equals(VduStateType.NOTFOUND)) {
+ vduPlugin.deleteVdu(cloudInfo, vfModuleId, 5);
+ }
} catch (VduException me) {
me.addContext("DeleteVfModule");
// Convert to a generic VnfException