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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations