jobEntity = jobProgressEntity.getBody().get("entity");
} while (!jobStatus.equals("finished"));
}
private CloudResources getKnownRemoteResources(ApplicationArchive archive) throws IOException {
CloudResources archiveResources = new CloudResources(archive);
String json = JsonUtil.convertToJson(archiveResources);
HttpHeaders headers = new HttpHeaders();
headers.setContentType(JsonUtil.JSON_MEDIA_TYPE);
HttpEntity<String> requestEntity = new HttpEntity<String>(json, headers);
ResponseEntity<String> responseEntity =
getRestTemplate().exchange(getUrl("/v2/resource_match"), HttpMethod.PUT, requestEntity, String.class);
List<CloudResource> cloudResources = JsonUtil.convertJsonToCloudResourceList(responseEntity.getBody());
return new CloudResources(cloudResources);
}