Search in sources :

Example 1 with SdxAwsRequest

use of com.sequenceiq.sdx.api.model.SdxAwsRequest in project cloudbreak by hortonworks.

the class SdxServiceTest method setSpot.

private void setSpot(SdxClusterRequestBase sdxClusterRequest) {
    SdxAwsRequest aws = new SdxAwsRequest();
    SdxAwsSpotParameters spot = new SdxAwsSpotParameters();
    spot.setPercentage(100);
    spot.setMaxPrice(0.9);
    aws.setSpot(spot);
    sdxClusterRequest.setAws(aws);
}
Also used : SdxAwsSpotParameters(com.sequenceiq.sdx.api.model.SdxAwsSpotParameters) SdxAwsRequest(com.sequenceiq.sdx.api.model.SdxAwsRequest)

Example 2 with SdxAwsRequest

use of com.sequenceiq.sdx.api.model.SdxAwsRequest in project cloudbreak by hortonworks.

the class SdxTestDto method withSpotPercentage.

public SdxTestDto withSpotPercentage(int spotPercentage) {
    SdxAwsRequest aws = getRequest().getAws();
    if (Objects.isNull(aws)) {
        aws = new SdxAwsRequest();
        getRequest().setAws(aws);
    }
    SdxAwsSpotParameters spot = new SdxAwsSpotParameters();
    spot.setPercentage(spotPercentage);
    aws.setSpot(spot);
    return this;
}
Also used : SdxAwsSpotParameters(com.sequenceiq.sdx.api.model.SdxAwsSpotParameters) SdxAwsRequest(com.sequenceiq.sdx.api.model.SdxAwsRequest)

Aggregations

SdxAwsRequest (com.sequenceiq.sdx.api.model.SdxAwsRequest)2 SdxAwsSpotParameters (com.sequenceiq.sdx.api.model.SdxAwsSpotParameters)2