use of com.sequenceiq.cloudbreak.api.endpoint.v4.audits.responses.AuditEventV4Responses in project cloudbreak by hortonworks.
the class DistroXTestDto method investigate.
@Override
public Clue investigate() {
if (getResponse() == null || getResponse().getId() == null) {
return null;
}
AuditEventV4Responses auditEvents = AuditUtil.getAuditEvents(getTestContext().getMicroserviceClient(CloudbreakClient.class), CloudbreakEventService.DATAHUB_RESOURCE_TYPE, getResponse().getId(), null);
boolean hasSpotTermination = (getResponse().getInstanceGroups() == null) ? false : getResponse().getInstanceGroups().stream().flatMap(ig -> ig.getMetadata().stream()).anyMatch(metadata -> InstanceStatus.DELETED_BY_PROVIDER == metadata.getInstanceStatus());
return new Clue("DistroX", auditEvents, getResponse(), hasSpotTermination);
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.audits.responses.AuditEventV4Responses in project cloudbreak by hortonworks.
the class StackTestDto method investigate.
@Override
public Clue investigate() {
if (getResponse() == null || getResponse().getId() == null) {
return null;
}
AuditEventV4Responses auditEvents = AuditUtil.getAuditEvents(getTestContext().getMicroserviceClient(CloudbreakClient.class), CloudbreakEventService.DATAHUB_RESOURCE_TYPE, getResponse().getId(), null);
boolean hasSpotTermination = (getResponse().getInstanceGroups() == null) ? false : getResponse().getInstanceGroups().stream().flatMap(ig -> ig.getMetadata().stream()).anyMatch(metadata -> InstanceStatus.DELETED_BY_PROVIDER == metadata.getInstanceStatus());
return new Clue("DistroX", auditEvents, getResponse(), hasSpotTermination);
}
Aggregations