diff options
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/main/java')
4 files changed, 9 insertions, 7 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/cnf/tasks/CnfAdapterCreateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/cnf/tasks/CnfAdapterCreateTasks.java index ed01f2271f..5e3b781903 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/cnf/tasks/CnfAdapterCreateTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/cnf/tasks/CnfAdapterCreateTasks.java @@ -170,7 +170,7 @@ public class CnfAdapterCreateTasks { logger.debug("currentFlow: {}", currentFlow); String apiPath = "http://so-cnf-adapter:8090"; - if ("CreateVfModuleBB".equals(currentFlow)) { + if ("CreateVfModuleBB".equals(currentFlow) || ("UpgradeVfModuleBB".equals(currentFlow))) { apiPath = apiPath + "/api/cnf-adapter/v1/aai-update/"; } else if ("DeleteVfModuleBB".equals(currentFlow)) { apiPath = apiPath + "/api/cnf-adapter/v1/aai-delete/"; diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/cnf/tasks/CnfAdapterUpgradeTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/cnf/tasks/CnfAdapterUpgradeTasks.java index 2eebde0687..4fd0aab397 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/cnf/tasks/CnfAdapterUpgradeTasks.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/cnf/tasks/CnfAdapterUpgradeTasks.java @@ -90,7 +90,8 @@ public class CnfAdapterUpgradeTasks { Map<String, String> sdncDirectives = getSdncDirectives(paramsMap); UpgradeInstanceRequest upgradeInstanceRequest = upgradeInstanceRequest(vfModule, cloudRegion, sdncDirectives); - UpgradeInstanceResponse response = cnfAdapterClient.upgradeVfModule(upgradeInstanceRequest); + String heatStackId = vfModule.getHeatStackId(); + UpgradeInstanceResponse response = cnfAdapterClient.upgradeVfModule(upgradeInstanceRequest, heatStackId); execution.setVariable("heatStackId", response.getId()); } catch (Exception ex) { logger.error("Exception occurred", ex); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListener.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListener.java index dc77ea1f0c..6df4f76a59 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListener.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/listeners/SkipCDSBuildingBlockListener.java @@ -47,8 +47,8 @@ public class SkipCDSBuildingBlockListener implements PreFlowManipulator { @Autowired private CatalogDbClient catalogDbClient; - private Set<String> vnfActions = - new HashSet<String>(Arrays.asList("config-assign", "config-deploy", "VnfConfigAssign", "VnfConfigDeploy")); + private Set<String> vnfActions = new HashSet<String>(Arrays.asList("config-assign", "config-deploy", + "VnfConfigAssign", "VnfConfigDeploy", "config-upgrade-assign", "config-upgrade-deploy")); private Set<String> vFModuleAction = new HashSet<String>(Arrays.asList("VfModuleConfigAssign", "VfModuleConfigDeploy")); diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/CnfAdapterClient.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/CnfAdapterClient.java index e8122e7784..82c0e4916e 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/CnfAdapterClient.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/cnf/CnfAdapterClient.java @@ -118,11 +118,12 @@ public class CnfAdapterClient { } @Retryable(value = {HttpServerErrorException.class}, maxAttempts = 3, backoff = @Backoff(delay = 3000)) - public UpgradeInstanceResponse upgradeVfModule(UpgradeInstanceRequest request) throws CnfAdapterClientException { + public UpgradeInstanceResponse upgradeVfModule(UpgradeInstanceRequest request, String heatStackId) + throws CnfAdapterClientException { try { String uri = "http://so-cnf-adapter:8090"; - String endpoint = UriBuilder.fromUri(uri).path("/api/cnf-adapter/v1/instance/{instanceID}/upgrade").build() - .toString(); + String endpoint = UriBuilder.fromUri(uri).path(INSTANCE_CREATE_PATH + "/" + heatStackId + "/upgrade") + .build().toString(); HttpEntity<?> entity = getHttpEntity(request); ResponseEntity<UpgradeInstanceResponse> result = restTemplate.exchange(endpoint, HttpMethod.POST, entity, UpgradeInstanceResponse.class); |