Search in sources :

Example 1 with GcpDatabaseServerV4Parameters

use of com.sequenceiq.redbeams.api.endpoint.v4.stacks.gcp.GcpDatabaseServerV4Parameters in project cloudbreak by hortonworks.

the class GcpDatabaseServerParameterSetter method setParameters.

@Override
public void setParameters(DatabaseServerV4StackRequest request, SdxDatabaseAvailabilityType availabilityType, String databaseEngineVersion) {
    GcpDatabaseServerV4Parameters parameters = new GcpDatabaseServerV4Parameters();
    if (SdxDatabaseAvailabilityType.HA.equals(availabilityType)) {
        parameters.setBackupRetentionDays(backupRetentionPeriodNonHa);
    } else if (SdxDatabaseAvailabilityType.NON_HA.equals(availabilityType)) {
        parameters.setBackupRetentionDays(backupRetentionPeriodNonHa);
    } else {
        throw new IllegalArgumentException(availabilityType + " database availability type is not supported on Azure.");
    }
    if (StringUtils.isNotEmpty(databaseEngineVersion)) {
        parameters.setEngineVersion(databaseEngineVersion);
    }
    request.setGcp(parameters);
}
Also used : GcpDatabaseServerV4Parameters(com.sequenceiq.redbeams.api.endpoint.v4.stacks.gcp.GcpDatabaseServerV4Parameters)

Example 2 with GcpDatabaseServerV4Parameters

use of com.sequenceiq.redbeams.api.endpoint.v4.stacks.gcp.GcpDatabaseServerV4Parameters in project cloudbreak by hortonworks.

the class GcpDatabaseServerParameterDecorator method setParameters.

@Override
public void setParameters(DatabaseServerV4StackRequest request, DatabaseServerParameter serverParameter) {
    GcpDatabaseServerV4Parameters parameters = new GcpDatabaseServerV4Parameters();
    parameters.setEngineVersion(serverParameter.getEngineVersion());
    request.setGcp(parameters);
}
Also used : GcpDatabaseServerV4Parameters(com.sequenceiq.redbeams.api.endpoint.v4.stacks.gcp.GcpDatabaseServerV4Parameters)

Aggregations

GcpDatabaseServerV4Parameters (com.sequenceiq.redbeams.api.endpoint.v4.stacks.gcp.GcpDatabaseServerV4Parameters)2