use of com.sequenceiq.environment.api.v1.environment.model.request.AttachedFreeIpaRequest 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;
}
use of com.sequenceiq.environment.api.v1.environment.model.request.AttachedFreeIpaRequest in project cloudbreak by hortonworks.
the class FreeIpaConverterTest method testConvertWithInstanceType.
@Test
public void testConvertWithInstanceType() {
// GIVEN
AttachedFreeIpaRequest request = new AttachedFreeIpaRequest();
request.setCreate(true);
request.setInstanceType(INSTANCE_TYPE);
// WHEN
FreeIpaCreationDto result = underTest.convert(request, "id", CloudConstants.AWS);
// THEN
assertNotNull(result.getInstanceType());
assertEquals(INSTANCE_TYPE, result.getInstanceType());
}
use of com.sequenceiq.environment.api.v1.environment.model.request.AttachedFreeIpaRequest in project cloudbreak by hortonworks.
the class FreeIpaConverterTest method testConvertWithoutImage.
@Test
public void testConvertWithoutImage() {
// GIVEN
AttachedFreeIpaRequest request = new AttachedFreeIpaRequest();
request.setCreate(true);
request.setImage(null);
// WHEN
FreeIpaCreationDto result = underTest.convert(request, "id", CloudConstants.AWS);
// THEN
assertNull(result.getImageCatalog());
assertNull(result.getImageId());
}
use of com.sequenceiq.environment.api.v1.environment.model.request.AttachedFreeIpaRequest in project cloudbreak by hortonworks.
the class FreeIpaConverterTest method testConvertWithoutImageIdAndImageCatalog.
@Test
public void testConvertWithoutImageIdAndImageCatalog() {
// GIVEN
AttachedFreeIpaRequest request = new AttachedFreeIpaRequest();
request.setCreate(true);
request.setImage(aFreeIpaImage(null, null));
// WHEN
FreeIpaCreationDto result = underTest.convert(request, "id", CloudConstants.AWS);
// THEN
assertNull(result.getImageCatalog());
assertNull(result.getImageId());
}
use of com.sequenceiq.environment.api.v1.environment.model.request.AttachedFreeIpaRequest in project cloudbreak by hortonworks.
the class YarnCloudProvider method environment.
@Override
public EnvironmentTestDto environment(EnvironmentTestDto environment) {
final AttachedFreeIpaRequest attachedFreeIpaRequest = new AttachedFreeIpaRequest();
attachedFreeIpaRequest.setCreate(Boolean.FALSE);
return environment.withLocation(location()).withFreeIpa(attachedFreeIpaRequest);
}
Aggregations