Search in sources :

Example 1 with PlatformDisksResponse

use of com.sequenceiq.environment.api.v1.platformresource.model.PlatformDisksResponse in project cloudbreak by hortonworks.

the class CredentialPlatformResourceController method getDisktypes.

@Override
@DisableCheckPermissions
public PlatformDisksResponse getDisktypes() {
    LOGGER.info("Get /platform_resources/disk_types");
    PlatformDisks disks = platformParameterService.getDiskTypes();
    PlatformDisksResponse response = platformDisksToPlatformDisksV1ResponseConverter.convert(disks);
    LOGGER.info("Resp /platform_resources/disk_types, disks: {}, response: {}", disks, response);
    return response;
}
Also used : PlatformDisksResponse(com.sequenceiq.environment.api.v1.platformresource.model.PlatformDisksResponse) PlatformDisks(com.sequenceiq.cloudbreak.cloud.model.PlatformDisks) DisableCheckPermissions(com.sequenceiq.authorization.annotation.DisableCheckPermissions)

Example 2 with PlatformDisksResponse

use of com.sequenceiq.environment.api.v1.platformresource.model.PlatformDisksResponse in project cloudbreak by hortonworks.

the class PlatformDisksToPlatformDisksV1ResponseConverter method convert.

public PlatformDisksResponse convert(PlatformDisks source) {
    PlatformDisksResponse json = new PlatformDisksResponse();
    json.setDefaultDisks(convertDefaults(source.getDefaultDisks()));
    json.setDiskTypes(PlatformConverterUtil.convertPlatformMap(source.getDiskTypes()));
    json.setDiskMappings(diskMappingsConvert(source.getDiskMappings()));
    json.setDisplayNames(PlatformConverterUtil.convertDisplayNameMap(source.getDiskDisplayNames()));
    return json;
}
Also used : PlatformDisksResponse(com.sequenceiq.environment.api.v1.platformresource.model.PlatformDisksResponse)

Aggregations

PlatformDisksResponse (com.sequenceiq.environment.api.v1.platformresource.model.PlatformDisksResponse)2 DisableCheckPermissions (com.sequenceiq.authorization.annotation.DisableCheckPermissions)1 PlatformDisks (com.sequenceiq.cloudbreak.cloud.model.PlatformDisks)1