Search in sources :

Example 6 with OpenstackCloudProvider

use of com.sequenceiq.it.cloudbreak.newway.cloud.OpenstackCloudProvider in project cloudbreak by hortonworks.

the class VmTypeTests method testOSDefaultVMTypeSupport.

@Test(priority = 10, groups = "vmtypes")
public void testOSDefaultVMTypeSupport() throws Exception {
    OpenstackCloudProvider provider = new OpenstackCloudProvider(getTestParameter());
    given(CloudbreakClient.isCreated());
    given(provider.aValidCredential().withName(OS_CRED_NAME), "OpenStack credential is created");
    given(VmType.request().withPlatform(provider.getPlatform()).withRegion(provider.region()).withAvailabilityZone(provider.availabilityZone()), "OpenStack vm type request");
    when(VmType.getPlatformVmTypes(), "vm types are requested to OpenStack credential and " + provider.region() + " region.");
    then(VmType.assertThis((vmtype, t) -> {
        LOGGER.info("OpenStack Default Virtual Machine is not supported for OpenStack.");
        Assert.assertNull(vmtype.getResponse().getVmTypes().get(provider.availabilityZone()).getDefaultVirtualMachine(), "OpenStack Default Virtual Machine should not be present in response!");
    }), "OpenStack Default Virtual Machine should not be part of the response.");
}
Also used : CloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.CloudProvider) TestParameter(com.sequenceiq.it.cloudbreak.newway.TestParameter) Logger(org.slf4j.Logger) ForbiddenException(javax.ws.rs.ForbiddenException) CloudbreakClient(com.sequenceiq.it.cloudbreak.newway.CloudbreakClient) AwsCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.AwsCloudProvider) LoggerFactory(org.slf4j.LoggerFactory) Set(java.util.Set) Test(org.testng.annotations.Test) Credential(com.sequenceiq.it.cloudbreak.newway.Credential) GcpCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.GcpCloudProvider) VmType(com.sequenceiq.it.cloudbreak.newway.VmType) AfterTest(org.testng.annotations.AfterTest) Assert(org.testng.Assert) AzureCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.AzureCloudProvider) BadRequestException(javax.ws.rs.BadRequestException) CloudbreakTest(com.sequenceiq.it.cloudbreak.newway.CloudbreakTest) OpenstackCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.OpenstackCloudProvider) VmTypeJson(com.sequenceiq.cloudbreak.api.model.VmTypeJson) OpenstackCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.OpenstackCloudProvider) Test(org.testng.annotations.Test) AfterTest(org.testng.annotations.AfterTest) CloudbreakTest(com.sequenceiq.it.cloudbreak.newway.CloudbreakTest)

Example 7 with OpenstackCloudProvider

use of com.sequenceiq.it.cloudbreak.newway.cloud.OpenstackCloudProvider in project cloudbreak by hortonworks.

the class DiskTypeTests method testListOSDiskMappings.

@Test(priority = 13, groups = "disktypes")
public void testListOSDiskMappings() throws Exception {
    OpenstackCloudProvider provider = new OpenstackCloudProvider(getTestParameter());
    listDiskMappingsForProvider(provider);
}
Also used : OpenstackCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.OpenstackCloudProvider) Test(org.testng.annotations.Test) CloudbreakTest(com.sequenceiq.it.cloudbreak.newway.CloudbreakTest)

Example 8 with OpenstackCloudProvider

use of com.sequenceiq.it.cloudbreak.newway.cloud.OpenstackCloudProvider in project cloudbreak by hortonworks.

the class DiskTypeTests method testListOSDefaultDisks.

@Test(priority = 5, groups = "disktypes")
public void testListOSDefaultDisks() throws Exception {
    OpenstackCloudProvider provider = new OpenstackCloudProvider(getTestParameter());
    listDefaultDisksForProvdier(provider);
}
Also used : OpenstackCloudProvider(com.sequenceiq.it.cloudbreak.newway.cloud.OpenstackCloudProvider) Test(org.testng.annotations.Test) CloudbreakTest(com.sequenceiq.it.cloudbreak.newway.CloudbreakTest)

Aggregations

CloudbreakTest (com.sequenceiq.it.cloudbreak.newway.CloudbreakTest)8 OpenstackCloudProvider (com.sequenceiq.it.cloudbreak.newway.cloud.OpenstackCloudProvider)8 Test (org.testng.annotations.Test)8 AfterTest (org.testng.annotations.AfterTest)4 CloudbreakClient (com.sequenceiq.it.cloudbreak.newway.CloudbreakClient)2 TestParameter (com.sequenceiq.it.cloudbreak.newway.TestParameter)2 AwsCloudProvider (com.sequenceiq.it.cloudbreak.newway.cloud.AwsCloudProvider)2 AzureCloudProvider (com.sequenceiq.it.cloudbreak.newway.cloud.AzureCloudProvider)2 CloudProvider (com.sequenceiq.it.cloudbreak.newway.cloud.CloudProvider)2 GcpCloudProvider (com.sequenceiq.it.cloudbreak.newway.cloud.GcpCloudProvider)2 Logger (org.slf4j.Logger)2 LoggerFactory (org.slf4j.LoggerFactory)2 Assert (org.testng.Assert)2 VmTypeJson (com.sequenceiq.cloudbreak.api.model.VmTypeJson)1 Credential (com.sequenceiq.it.cloudbreak.newway.Credential)1 DiskTypes (com.sequenceiq.it.cloudbreak.newway.DiskTypes)1 VmType (com.sequenceiq.it.cloudbreak.newway.VmType)1 Collection (java.util.Collection)1 Map (java.util.Map)1 Entry (java.util.Map.Entry)1