}
@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);