Code & Workflow Enhancements for CNF - Upgrade
[so.git] / bpmn / so-bpmn-tasks / src / main / java / org / onap / so / client / adapter / cnf / CnfAdapterClient.java
index e8122e7..82c0e49 100644 (file)
@@ -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);