Search in sources :

Example 1 with FileSystemRequest

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

the class FileSystemToFileSystemRequestConverter method convert.

@Override
public FileSystemRequest convert(FileSystem source) {
    FileSystemRequest fileSystemRequest = new FileSystemRequest();
    fileSystemRequest.setName(source.getName());
    fileSystemRequest.setProperties(source.getProperties());
    fileSystemRequest.setType(FileSystemType.valueOf(source.getType()));
    return fileSystemRequest;
}
Also used : FileSystemRequest(com.sequenceiq.cloudbreak.api.model.FileSystemRequest)

Example 2 with FileSystemRequest

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

the class FilesystemConfigureTest method testFilesystemConfigure.

@Test
@Parameters({ "filesystemType", "fsName" })
public void testFilesystemConfigure(String filesystemType, String fsName) {
    // GIVEN
    IntegrationTestContext itContext = getItContext();
    Map<String, String> cloudProviderParams = itContext.getContextParam(CloudbreakITContextConstants.CLOUDPROVIDER_PARAMETERS, Map.class);
    // WHEN
    FileSystemRequest fsRequest = new FileSystemRequest();
    fsRequest.setProperties(createRequestProperties(cloudProviderParams, fsName));
    fsRequest.setType(FileSystemType.valueOf(filesystemType));
    fsRequest.setName("it-fs");
    fsRequest.setDefaultFs(false);
    // THEN
    getItContext().putContextParam(FSREQUEST, fsRequest);
}
Also used : IntegrationTestContext(com.sequenceiq.it.IntegrationTestContext) FileSystemRequest(com.sequenceiq.cloudbreak.api.model.FileSystemRequest) Parameters(org.testng.annotations.Parameters) AbstractCloudbreakIntegrationTest(com.sequenceiq.it.cloudbreak.AbstractCloudbreakIntegrationTest) Test(org.testng.annotations.Test)

Example 3 with FileSystemRequest

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

the class ClusterCreationTest method setFileSystem.

private ClusterRequest setFileSystem(IntegrationTestContext itContext, ClusterRequest clusterRequest) {
    Assert.assertNotNull(itContext.getContextParam(CloudbreakITContextConstants.FSREQUEST, FileSystemRequest.class), "Filesystem was not configured");
    FileSystemRequest fsRequest = itContext.getContextParam(CloudbreakITContextConstants.FSREQUEST, FileSystemRequest.class);
    clusterRequest.setFileSystem(fsRequest);
    return clusterRequest;
}
Also used : FileSystemRequest(com.sequenceiq.cloudbreak.api.model.FileSystemRequest)

Aggregations

FileSystemRequest (com.sequenceiq.cloudbreak.api.model.FileSystemRequest)3 IntegrationTestContext (com.sequenceiq.it.IntegrationTestContext)1 AbstractCloudbreakIntegrationTest (com.sequenceiq.it.cloudbreak.AbstractCloudbreakIntegrationTest)1 Parameters (org.testng.annotations.Parameters)1 Test (org.testng.annotations.Test)1