Search in sources :

Example 1 with AwsFreeIpaSpotParameters

use of com.sequenceiq.environment.api.v1.environment.model.request.aws.AwsFreeIpaSpotParameters in project cloudbreak by hortonworks.

the class EnvironmentApiConverterTest method createFreeIpaRequest.

private AttachedFreeIpaRequest createFreeIpaRequest() {
    AwsFreeIpaSpotParameters awsFreeIpaSpotParameters = new AwsFreeIpaSpotParameters();
    awsFreeIpaSpotParameters.setPercentage(50);
    awsFreeIpaSpotParameters.setMaxPrice(0.9);
    AwsFreeIpaParameters awsFreeIpaParameters = new AwsFreeIpaParameters();
    awsFreeIpaParameters.setSpot(awsFreeIpaSpotParameters);
    AttachedFreeIpaRequest attachedFreeIpaRequest = new AttachedFreeIpaRequest();
    attachedFreeIpaRequest.setAws(awsFreeIpaParameters);
    return attachedFreeIpaRequest;
}
Also used : AttachedFreeIpaRequest(com.sequenceiq.environment.api.v1.environment.model.request.AttachedFreeIpaRequest) AwsFreeIpaParameters(com.sequenceiq.environment.api.v1.environment.model.request.aws.AwsFreeIpaParameters) AwsFreeIpaSpotParameters(com.sequenceiq.environment.api.v1.environment.model.request.aws.AwsFreeIpaSpotParameters)

Example 2 with AwsFreeIpaSpotParameters

use of com.sequenceiq.environment.api.v1.environment.model.request.aws.AwsFreeIpaSpotParameters in project cloudbreak by hortonworks.

the class FreeIpaConverter method convertAwsSpot.

private AwsFreeIpaSpotParameters convertAwsSpot(FreeIpaCreationAwsSpotParametersDto spot) {
    AwsFreeIpaSpotParameters result = new AwsFreeIpaSpotParameters();
    result.setPercentage(spot.getPercentage());
    result.setMaxPrice(spot.getMaxPrice());
    return result;
}
Also used : AwsFreeIpaSpotParameters(com.sequenceiq.environment.api.v1.environment.model.request.aws.AwsFreeIpaSpotParameters)

Example 3 with AwsFreeIpaSpotParameters

use of com.sequenceiq.environment.api.v1.environment.model.request.aws.AwsFreeIpaSpotParameters in project cloudbreak by hortonworks.

the class AwsCloudProvider method getAttachedFreeIpaRequest.

private AttachedFreeIpaRequest getAttachedFreeIpaRequest() {
    AttachedFreeIpaRequest attachedFreeIpaRequest = new AttachedFreeIpaRequest();
    AwsFreeIpaParameters awsFreeIpaParameters = new AwsFreeIpaParameters();
    AwsFreeIpaSpotParameters awsFreeIpaSpotParameters = new AwsFreeIpaSpotParameters();
    awsFreeIpaSpotParameters.setPercentage(getSpotPercentage());
    awsFreeIpaParameters.setSpot(awsFreeIpaSpotParameters);
    attachedFreeIpaRequest.setAws(awsFreeIpaParameters);
    return attachedFreeIpaRequest;
}
Also used : AttachedFreeIpaRequest(com.sequenceiq.environment.api.v1.environment.model.request.AttachedFreeIpaRequest) AwsFreeIpaParameters(com.sequenceiq.environment.api.v1.environment.model.request.aws.AwsFreeIpaParameters) AwsFreeIpaSpotParameters(com.sequenceiq.environment.api.v1.environment.model.request.aws.AwsFreeIpaSpotParameters)

Aggregations

AwsFreeIpaSpotParameters (com.sequenceiq.environment.api.v1.environment.model.request.aws.AwsFreeIpaSpotParameters)3 AttachedFreeIpaRequest (com.sequenceiq.environment.api.v1.environment.model.request.AttachedFreeIpaRequest)2 AwsFreeIpaParameters (com.sequenceiq.environment.api.v1.environment.model.request.aws.AwsFreeIpaParameters)2