Search in sources :

Example 1 with HealthcheckInstance

use of org.onap.so.client.adapter.cnf.entities.HealthcheckInstance in project so by onap.

the class CnfHealthCheckTasks method createStatusCheckRequest.

protected HealthcheckInstanceRequest createStatusCheckRequest(List<String> listOfHeatStackIds, String callBackUrl) throws JsonProcessingException {
    HealthcheckInstanceRequest healthcheckInstanceRequest = new HealthcheckInstanceRequest();
    List<HealthcheckInstance> listOfHealthcheckInstance = new ArrayList<>();
    listOfHeatStackIds.stream().forEach(x -> listOfHealthcheckInstance.add(new HealthcheckInstance(x)));
    LOGGER.debug("listOfHealthcheckInstance: {}", listOfHealthcheckInstance);
    healthcheckInstanceRequest.setInstances(listOfHealthcheckInstance);
    healthcheckInstanceRequest.setCallbackUrl(callBackUrl);
    LOGGER.debug("healthcheckInstanceRequest: {}", healthcheckInstanceRequest);
    return healthcheckInstanceRequest;
}
Also used : HealthcheckInstanceRequest(org.onap.so.client.adapter.cnf.entities.HealthcheckInstanceRequest) HealthcheckInstance(org.onap.so.client.adapter.cnf.entities.HealthcheckInstance) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 HealthcheckInstance (org.onap.so.client.adapter.cnf.entities.HealthcheckInstance)1 HealthcheckInstanceRequest (org.onap.so.client.adapter.cnf.entities.HealthcheckInstanceRequest)1