use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.ClusterV4Request in project cloudbreak by hortonworks.
the class StackV4RequestToGatewayConverterTest method generateStackV4Request.
private StackV4Request generateStackV4Request(GatewayV4Request gateWayJson) {
ClusterV4Request clusterRequest = new ClusterV4Request();
clusterRequest.setGateway(gateWayJson);
StackV4Request source = new StackV4Request();
source.setName("funnyCluster");
source.setCluster(clusterRequest);
return source;
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.ClusterV4Request in project cloudbreak by hortonworks.
the class YcloudHybridCloudTest method validateRequestParameters.
private SdxInternalTestDto validateRequestParameters(TestContext tc, SdxInternalTestDto dto, SdxClient client) {
assertNotNull(dto);
SdxInternalClusterRequest sdxRequest = dto.getRequest();
assertNotNull(sdxRequest);
StackV4Request stackRequest = sdxRequest.getStackV4Request();
assertNotNull(stackRequest);
ClusterV4Request clusterRequest = stackRequest.getCluster();
assertNotNull(clusterRequest);
ClouderaManagerV4Request cmRequest = clusterRequest.getCm();
assertNotNull(cmRequest);
validateInstanceGroups(stackRequest.getInstanceGroups());
validateRepository(cmRequest.getRepository());
validateProducts(cmRequest.getProducts());
return dto;
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.ClusterV4Request in project cloudbreak by hortonworks.
the class DistroXClusterToClusterConverterTest method testConvertWithoutEnvTheCloudStorageShouldBeSetBasedOnTheInputs.
@Test
void testConvertWithoutEnvTheCloudStorageShouldBeSetBasedOnTheInputs() {
CloudStorageRequest decoratorResult = new CloudStorageRequest();
when(cloudStorageDecorator.decorate(distroXV1RequestInput.getCluster().getBlueprintName(), distroXV1RequestInput.getName(), distroXV1RequestInput.getCluster().getCloudStorage(), null)).thenReturn(decoratorResult);
when(regionAwareInternalCrnGenerator.getInternalCrnForServiceAsString()).thenReturn("crn");
when(regionAwareInternalCrnGeneratorFactory.iam()).thenReturn(regionAwareInternalCrnGenerator);
ClusterV4Request result = testConvertDistroXV1Request();
assertNotNull(result);
assertEquals(decoratorResult, result.getCloudStorage());
verify(cloudStorageDecorator, times(1)).decorate(any(), any(), any(), any());
verify(cloudStorageDecorator, times(1)).decorate(distroXV1RequestInput.getCluster().getBlueprintName(), distroXV1RequestInput.getName(), distroXV1RequestInput.getCluster().getCloudStorage(), null);
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.ClusterV4Request in project cloudbreak by hortonworks.
the class DistroXClusterToClusterConverterTest method testConvertWithEnvTheCustomQueueShouldBeSetToNull.
@Test
void testConvertWithEnvTheCustomQueueShouldBeSetToNull() {
when(regionAwareInternalCrnGenerator.getInternalCrnForServiceAsString()).thenReturn("crn");
when(regionAwareInternalCrnGeneratorFactory.iam()).thenReturn(regionAwareInternalCrnGenerator);
ClusterV4Request result = testConvertDistroXV1RequestWithEnvironment();
assertNotNull(result);
assertNull(result.getCustomQueue());
}
use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.ClusterV4Request in project cloudbreak by hortonworks.
the class DistroXClusterToClusterConverterTest method testConvertWithEnvTheValidateBlueprintShouldBeSet.
@Test
void testConvertWithEnvTheValidateBlueprintShouldBeSet() {
when(regionAwareInternalCrnGenerator.getInternalCrnForServiceAsString()).thenReturn("crn");
when(regionAwareInternalCrnGeneratorFactory.iam()).thenReturn(regionAwareInternalCrnGenerator);
ClusterV4Request result = testConvertDistroXV1RequestWithEnvironment();
assertNotNull(result);
assertEquals(distroXV1RequestInput.getCluster().getValidateBlueprint(), result.getValidateBlueprint());
}
Aggregations