Search in sources :

Example 6 with PlatformResourceRequest

use of com.sequenceiq.cloudbreak.domain.PlatformResourceRequest in project cloudbreak by hortonworks.

the class PlatformParameterV1Controller method getIpPoolsCredentialId.

@Override
public PlatformIpPoolsResponse getIpPoolsCredentialId(PlatformResourceRequestJson resourceRequestJson) {
    resourceRequestJson = prepareAccountAndOwner(resourceRequestJson, authenticatedUserService.getCbUser());
    PlatformResourceRequest convert = conversionService.convert(resourceRequestJson, PlatformResourceRequest.class);
    CloudIpPools cloudIpPools = cloudParameterService.getPublicIpPools(convert.getCredential(), convert.getRegion(), convert.getPlatformVariant(), convert.getFilters());
    return conversionService.convert(cloudIpPools, PlatformIpPoolsResponse.class);
}
Also used : CloudIpPools(com.sequenceiq.cloudbreak.cloud.model.CloudIpPools) PlatformResourceRequest(com.sequenceiq.cloudbreak.domain.PlatformResourceRequest)

Example 7 with PlatformResourceRequest

use of com.sequenceiq.cloudbreak.domain.PlatformResourceRequest in project cloudbreak by hortonworks.

the class PlatformParameterV1Controller method getSecurityGroups.

@Override
public PlatformSecurityGroupsResponse getSecurityGroups(PlatformResourceRequestJson resourceRequestJson) {
    resourceRequestJson = prepareAccountAndOwner(resourceRequestJson, authenticatedUserService.getCbUser());
    PlatformResourceRequest convert = conversionService.convert(resourceRequestJson, PlatformResourceRequest.class);
    CloudSecurityGroups securityGroups = cloudParameterService.getSecurityGroups(convert.getCredential(), convert.getRegion(), convert.getPlatformVariant(), convert.getFilters());
    return conversionService.convert(securityGroups, PlatformSecurityGroupsResponse.class);
}
Also used : CloudSecurityGroups(com.sequenceiq.cloudbreak.cloud.model.CloudSecurityGroups) PlatformResourceRequest(com.sequenceiq.cloudbreak.domain.PlatformResourceRequest)

Example 8 with PlatformResourceRequest

use of com.sequenceiq.cloudbreak.domain.PlatformResourceRequest in project cloudbreak by hortonworks.

the class PlatformParameterV1Controller method getAccessConfigs.

@Override
public PlatformAccessConfigsResponse getAccessConfigs(PlatformResourceRequestJson resourceRequestJson) {
    resourceRequestJson = prepareAccountAndOwner(resourceRequestJson, authenticatedUserService.getCbUser());
    PlatformResourceRequest convert = conversionService.convert(resourceRequestJson, PlatformResourceRequest.class);
    CloudAccessConfigs cloudAccessConfigs = cloudParameterService.getCloudAccessConfigs(convert.getCredential(), convert.getRegion(), convert.getPlatformVariant(), convert.getFilters());
    return conversionService.convert(cloudAccessConfigs, PlatformAccessConfigsResponse.class);
}
Also used : CloudAccessConfigs(com.sequenceiq.cloudbreak.cloud.model.CloudAccessConfigs) PlatformResourceRequest(com.sequenceiq.cloudbreak.domain.PlatformResourceRequest)

Example 9 with PlatformResourceRequest

use of com.sequenceiq.cloudbreak.domain.PlatformResourceRequest in project cloudbreak by hortonworks.

the class PlatformParameterV2Controller method getRegionsByCredentialId.

@Override
public RegionResponse getRegionsByCredentialId(PlatformResourceRequestJson resourceRequestJson) {
    resourceRequestJson = prepareAccountAndOwner(resourceRequestJson, authenticatedUserService.getCbUser());
    PlatformResourceRequest convert = conversionService.convert(resourceRequestJson, PlatformResourceRequest.class);
    CloudRegions cloudRegions = cloudParameterService.getRegionsV2(convert.getCredential(), convert.getRegion(), convert.getPlatformVariant(), convert.getFilters());
    return conversionService.convert(cloudRegions, RegionResponse.class);
}
Also used : CloudRegions(com.sequenceiq.cloudbreak.cloud.model.CloudRegions) PlatformResourceRequest(com.sequenceiq.cloudbreak.domain.PlatformResourceRequest)

Example 10 with PlatformResourceRequest

use of com.sequenceiq.cloudbreak.domain.PlatformResourceRequest in project cloudbreak by hortonworks.

the class PlatformParameterV2Controller method getVmTypesByCredentialId.

@Override
public PlatformVmtypesResponse getVmTypesByCredentialId(PlatformResourceRequestJson resourceRequestJson) {
    resourceRequestJson = prepareAccountAndOwner(resourceRequestJson, authenticatedUserService.getCbUser());
    PlatformResourceRequest convert = conversionService.convert(resourceRequestJson, PlatformResourceRequest.class);
    fieldIsNotEmpty(resourceRequestJson.getRegion(), "region");
    CloudVmTypes cloudVmTypes = cloudParameterService.getVmTypesV2(convert.getCredential(), convert.getRegion(), convert.getPlatformVariant(), convert.getFilters());
    return conversionService.convert(cloudVmTypes, PlatformVmtypesResponse.class);
}
Also used : CloudVmTypes(com.sequenceiq.cloudbreak.cloud.model.CloudVmTypes) PlatformResourceRequest(com.sequenceiq.cloudbreak.domain.PlatformResourceRequest)

Aggregations

PlatformResourceRequest (com.sequenceiq.cloudbreak.domain.PlatformResourceRequest)10 CloudAccessConfigs (com.sequenceiq.cloudbreak.cloud.model.CloudAccessConfigs)1 CloudGateWays (com.sequenceiq.cloudbreak.cloud.model.CloudGateWays)1 CloudIpPools (com.sequenceiq.cloudbreak.cloud.model.CloudIpPools)1 CloudNetworks (com.sequenceiq.cloudbreak.cloud.model.CloudNetworks)1 CloudRegions (com.sequenceiq.cloudbreak.cloud.model.CloudRegions)1 CloudSecurityGroups (com.sequenceiq.cloudbreak.cloud.model.CloudSecurityGroups)1 CloudSshKeys (com.sequenceiq.cloudbreak.cloud.model.CloudSshKeys)1 CloudVmTypes (com.sequenceiq.cloudbreak.cloud.model.CloudVmTypes)1 PlatformRecommendation (com.sequenceiq.cloudbreak.cloud.model.PlatformRecommendation)1 IdentityUser (com.sequenceiq.cloudbreak.common.model.user.IdentityUser)1 BadRequestException (com.sequenceiq.cloudbreak.controller.BadRequestException)1