use of com.sequenceiq.freeipa.api.v1.freeipa.stack.model.describe.DescribeFreeIpaResponse in project cloudbreak by hortonworks.
the class FreeIpaScalingTests method getInstanceMetaDataResponses.
private Set<InstanceMetaDataResponse> getInstanceMetaDataResponses(String environmentCrn, FreeIpaClient client) {
DescribeFreeIpaResponse describeFreeIpaResponse = client.getDefaultClient().getFreeIpaV1Endpoint().describe(environmentCrn);
Set<InstanceMetaDataResponse> instanceMetaDataResponses = describeFreeIpaResponse.getInstanceGroups().stream().map(InstanceGroupResponse::getMetaData).flatMap(Set::stream).collect(Collectors.toSet());
return instanceMetaDataResponses;
}
use of com.sequenceiq.freeipa.api.v1.freeipa.stack.model.describe.DescribeFreeIpaResponse in project cloudbreak by hortonworks.
the class StackToDescribeFreeIpaResponseConverter method convert.
public DescribeFreeIpaResponse convert(Stack stack, ImageEntity image, FreeIpa freeIpa, UserSyncStatus userSyncStatus, Boolean includeAllInstances) {
DescribeFreeIpaResponse describeFreeIpaResponse = new DescribeFreeIpaResponse();
describeFreeIpaResponse.setName(stack.getName());
describeFreeIpaResponse.setEnvironmentCrn(stack.getEnvironmentCrn());
describeFreeIpaResponse.setCrn(stack.getResourceCrn());
describeFreeIpaResponse.setCloudPlatform(stack.getCloudPlatform());
describeFreeIpaResponse.setVariant(stack.getPlatformvariant());
describeFreeIpaResponse.setAuthentication(authenticationResponseConverter.convert(stack.getStackAuthentication()));
Optional.ofNullable(image).ifPresent(i -> describeFreeIpaResponse.setImage(imageSettingsResponseConverter.convert(i)));
Optional.ofNullable(freeIpa).ifPresent(f -> describeFreeIpaResponse.setFreeIpa(freeIpaServerResponseConverter.convert(f)));
describeFreeIpaResponse.setNetwork(networkResponseConverter.convert(stack));
describeFreeIpaResponse.setPlacement(convertToPlacementResponse(stack));
describeFreeIpaResponse.setTunnel(stack.getTunnel());
describeFreeIpaResponse.setInstanceGroups(instanceGroupConverter.convert(stack.getInstanceGroups(), includeAllInstances));
describeFreeIpaResponse.setAvailabilityStatus(stackToAvailabilityStatusConverter.convert(stack));
describeFreeIpaResponse.setStatus(stack.getStackStatus().getStatus());
describeFreeIpaResponse.setStatusString(stack.getStackStatus().getStatusString());
describeFreeIpaResponse.setStatusReason(stack.getStackStatus().getStatusReason());
decorateFreeIpaServerResponseWithIps(describeFreeIpaResponse.getFreeIpa(), describeFreeIpaResponse.getInstanceGroups());
decorateFreeIpaServerResponseWithLoadBalancedHost(stack, describeFreeIpaResponse.getFreeIpa(), freeIpa);
describeFreeIpaResponse.setAppVersion(stack.getAppVersion());
decorateWithCloudStorageAndTelemetry(stack, describeFreeIpaResponse);
Optional.ofNullable(userSyncStatus).ifPresent(u -> describeFreeIpaResponse.setUserSyncStatus(userSyncStatusConverter.convert(u)));
return describeFreeIpaResponse;
}
Aggregations