Search in sources :

Example 1 with SaltMasterHealth

use of com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.SaltMasterHealth in project cloudbreak by hortonworks.

the class SaltCheckerConclusionStepTest method createSaltPingResponse.

private RPCResponse<SaltHealthReport> createSaltPingResponse(HealthStatus masterServiceStatus, HealthStatus minionHealthStatus) {
    StatusDetails pingResponses = StatusDetails.newBuilder().setHost("host1").setStatus(minionHealthStatus).setStatusReason("bigproblem").build();
    SaltMinionsHealth saltMinionsHealth = SaltMinionsHealth.newBuilder().addPingResponses(pingResponses).build();
    ServiceStatus serviceStatus = ServiceStatus.newBuilder().setName("salt-bootstrap").setStatus(masterServiceStatus).build();
    SaltMasterHealth saltMasterHealth = SaltMasterHealth.newBuilder().addServices(serviceStatus).build();
    SaltHealthReport saltHealthReport = SaltHealthReport.newBuilder().setMaster(saltMasterHealth).setMinions(saltMinionsHealth).build();
    RPCResponse<SaltHealthReport> response = new RPCResponse<>();
    response.setResult(saltHealthReport);
    return response;
}
Also used : SaltMinionsHealth(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.SaltMinionsHealth) SaltHealthReport(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.SaltHealthReport) ServiceStatus(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.ServiceStatus) StatusDetails(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.StatusDetails) RPCResponse(com.sequenceiq.cloudbreak.client.RPCResponse) SaltMasterHealth(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.SaltMasterHealth)

Aggregations

SaltHealthReport (com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.SaltHealthReport)1 SaltMasterHealth (com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.SaltMasterHealth)1 SaltMinionsHealth (com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.SaltMinionsHealth)1 ServiceStatus (com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.ServiceStatus)1 StatusDetails (com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.StatusDetails)1 RPCResponse (com.sequenceiq.cloudbreak.client.RPCResponse)1