diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2020-12-21 10:45:16 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-12-21 10:45:16 +0000 |
commit | 75644b8a76bef8f412e404b67c42229ebb6b6b8c (patch) | |
tree | fb9820ac203516320cfee01f25f870a3a37c05c2 /adapters/mso-openstack-adapters/src/main | |
parent | 77ef2240265704d91dd0deb0ae10bc995ff94b9f (diff) | |
parent | 1373de8aaefd4790f63ee1e4386d682ea3a08209 (diff) |
Merge "skip delete heatbridge when multicloud orchestrator" into guilin1.7.11
Diffstat (limited to 'adapters/mso-openstack-adapters/src/main')
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 |