Search in sources :

Example 6 with AwsNetworkV4Parameters

use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.network.AwsNetworkV4Parameters in project cloudbreak by hortonworks.

the class NetworkV4BaseTest method testAwsNetworkPublicIpIsEmpty.

@Test
void testAwsNetworkPublicIpIsEmpty() {
    AwsNetworkV4Parameters networkParameters = new AwsNetworkV4Parameters();
    underTest.setAws(networkParameters);
    assertTrue(underTest.isNoPublicIp().isEmpty());
}
Also used : AwsNetworkV4Parameters(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.network.AwsNetworkV4Parameters) Test(org.junit.jupiter.api.Test)

Example 7 with AwsNetworkV4Parameters

use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.network.AwsNetworkV4Parameters in project cloudbreak by hortonworks.

the class InstanceGroupV1ToInstanceGroupV4ConverterTest method getNetworkV4Request.

private NetworkV4Request getNetworkV4Request() {
    NetworkV4Request networkV4Request = new NetworkV4Request();
    AwsNetworkV4Parameters awsNetworkV4Parameters = new AwsNetworkV4Parameters();
    awsNetworkV4Parameters.setSubnetId("aws-123");
    networkV4Request.setAws(awsNetworkV4Parameters);
    return networkV4Request;
}
Also used : NetworkV4Request(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.network.NetworkV4Request) InstanceGroupNetworkV4Request(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.instancegroup.network.InstanceGroupNetworkV4Request) AwsNetworkV4Parameters(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.network.AwsNetworkV4Parameters) InstanceGroupAwsNetworkV4Parameters(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.instancegroup.network.aws.InstanceGroupAwsNetworkV4Parameters)

Example 8 with AwsNetworkV4Parameters

use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.network.AwsNetworkV4Parameters in project cloudbreak by hortonworks.

the class NetworkV1ToNetworkV4ConverterTest method createAwsNetworkV4Parameters.

private AwsNetworkV4Parameters createAwsNetworkV4Parameters() {
    AwsNetworkV4Parameters p = new AwsNetworkV4Parameters();
    p.setSubnetId(SUBNET_ID);
    p.setVpcId(VPC_ID);
    p.setInternetGatewayId("someInternetGatewayId");
    return p;
}
Also used : AwsNetworkV4Parameters(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.network.AwsNetworkV4Parameters)

Example 9 with AwsNetworkV4Parameters

use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.network.AwsNetworkV4Parameters in project cloudbreak by hortonworks.

the class NetworkValidationServiceTest method testNetworkIfAwsRequestHasSubnetIdThenShouldReturnFalse.

@Test
public void testNetworkIfAwsRequestHasSubnetIdThenShouldReturnFalse() {
    NetworkV4Request networkV4Request = new NetworkV4Request();
    AwsNetworkV4Parameters awsNetworkV4Parameters = new AwsNetworkV4Parameters();
    awsNetworkV4Parameters.setSubnetId("subnet");
    networkV4Request.setAws(awsNetworkV4Parameters);
    Assert.assertFalse(underTest.shouldAddNetwork(CloudPlatform.AWS.name(), networkV4Request));
}
Also used : NetworkV4Request(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.network.NetworkV4Request) AwsNetworkV4Parameters(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.network.AwsNetworkV4Parameters) Test(org.junit.Test)

Example 10 with AwsNetworkV4Parameters

use of com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.network.AwsNetworkV4Parameters in project cloudbreak by hortonworks.

the class NetworkValidationServiceTest method testNetworkIfAwsRequestEmptyThenShouldReturnTrue.

@Test
public void testNetworkIfAwsRequestEmptyThenShouldReturnTrue() {
    NetworkV4Request networkV4Request = new NetworkV4Request();
    AwsNetworkV4Parameters awsNetworkV4Parameters = new AwsNetworkV4Parameters();
    networkV4Request.setAws(awsNetworkV4Parameters);
    Assert.assertTrue(underTest.shouldAddNetwork(CloudPlatform.AWS.name(), networkV4Request));
}
Also used : NetworkV4Request(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.network.NetworkV4Request) AwsNetworkV4Parameters(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.network.AwsNetworkV4Parameters) Test(org.junit.Test)

Aggregations

AwsNetworkV4Parameters (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.network.AwsNetworkV4Parameters)10 NetworkV4Request (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.network.NetworkV4Request)4 Test (org.junit.Test)2 Test (org.junit.jupiter.api.Test)2 InstanceGroupAwsNetworkV4Parameters (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.parameter.instancegroup.network.aws.InstanceGroupAwsNetworkV4Parameters)1 InstanceGroupNetworkV4Request (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.instancegroup.network.InstanceGroupNetworkV4Request)1 CloudSubnet (com.sequenceiq.cloudbreak.cloud.model.CloudSubnet)1 BadRequestException (com.sequenceiq.cloudbreak.common.exception.BadRequestException)1 ValidationResult (com.sequenceiq.cloudbreak.validation.ValidationResult)1 AwsNetworkV1Parameters (com.sequenceiq.distrox.api.v1.distrox.model.network.aws.AwsNetworkV1Parameters)1 EnvironmentNetworkResponse (com.sequenceiq.environment.api.v1.environment.model.response.EnvironmentNetworkResponse)1