summaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters/src/main/java
diff options
context:
space:
mode:
authorKalkere Ramesh, Sharan <sk720x@att.com>2020-12-18 14:51:22 -0500
committerKalkere Ramesh, Sharan <sk720x@att.com>2020-12-18 15:52:03 -0500
commit8a9734228ed8ad9b7e4bfe2486895647e20a5d77 (patch)
tree34189e8fa6858cfffb3c674aab0dd245fcb39312 /adapters/mso-openstack-adapters/src/main/java
parent1cf3bdec6f48670b24fabf8ba751e7a50e0325cb (diff)
skip delete heatbridge when multicloud orchestrator
Issue-ID: SO-3431 Change-Id: I212a38ae39128f538441e71935336db82ebdf351 Signed-off-by: Kalkere Ramesh, Sharan <sk720x@att.com>
Diffstat (limited to 'adapters/mso-openstack-adapters/src/main/java')
-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