Search in sources :

Example 1 with ClusterDbOpsSecurityUpgradeStatus

use of io.stackgres.apiweb.dto.cluster.ClusterDbOpsSecurityUpgradeStatus in project stackgres by ongres.

the class ClusterTransformer method getDbOpsStatus.

private ClusterDbOpsStatus getDbOpsStatus(StackGresClusterDbOpsStatus source) {
    if (source == null) {
        return null;
    }
    ClusterDbOpsStatus transformation = new ClusterDbOpsStatus();
    if (source.getRestart() != null) {
        ClusterDbOpsRestartStatus transformationRestart = new ClusterDbOpsRestartStatus();
        transformationRestart.setInitialInstances(source.getRestart().getInitialInstances());
        transformationRestart.setPrimaryInstance(source.getRestart().getPrimaryInstance());
        transformation.setRestart(transformationRestart);
    }
    if (source.getMinorVersionUpgrade() != null) {
        ClusterDbOpsMinorVersionUpgradeStatus transformationMinorVersionUpgrade = new ClusterDbOpsMinorVersionUpgradeStatus();
        transformationMinorVersionUpgrade.setInitialInstances(source.getMinorVersionUpgrade().getInitialInstances());
        transformationMinorVersionUpgrade.setPrimaryInstance(source.getMinorVersionUpgrade().getPrimaryInstance());
        transformation.setMinorVersionUpgrade(transformationMinorVersionUpgrade);
    }
    if (source.getSecurityUpgrade() != null) {
        ClusterDbOpsSecurityUpgradeStatus transformationSecurityUpgrade = new ClusterDbOpsSecurityUpgradeStatus();
        transformationSecurityUpgrade.setInitialInstances(source.getSecurityUpgrade().getInitialInstances());
        transformationSecurityUpgrade.setPrimaryInstance(source.getSecurityUpgrade().getPrimaryInstance());
        transformation.setSecurityUpgrade(transformationSecurityUpgrade);
    }
    if (source.getMajorVersionUpgrade() != null) {
        ClusterDbOpsMajorVersionUpgradeStatus transformationMajorVersionUpgrade = new ClusterDbOpsMajorVersionUpgradeStatus();
        transformationMajorVersionUpgrade.setInitialInstances(source.getMajorVersionUpgrade().getInitialInstances());
        transformationMajorVersionUpgrade.setPrimaryInstance(source.getMajorVersionUpgrade().getPrimaryInstance());
        transformationMajorVersionUpgrade.setSourcePostgresVersion(source.getMajorVersionUpgrade().getSourcePostgresVersion());
        transformationMajorVersionUpgrade.setTargetPostgresVersion(source.getMajorVersionUpgrade().getTargetPostgresVersion());
        transformationMajorVersionUpgrade.setCheck(source.getMajorVersionUpgrade().getCheck());
        transformationMajorVersionUpgrade.setLink(source.getMajorVersionUpgrade().getLink());
        transformationMajorVersionUpgrade.setClone(source.getMajorVersionUpgrade().getClone());
        transformationMajorVersionUpgrade.setLocale(source.getMajorVersionUpgrade().getLocale());
        transformationMajorVersionUpgrade.setEncoding(source.getMajorVersionUpgrade().getEncoding());
        transformationMajorVersionUpgrade.setDataChecksum(source.getMajorVersionUpgrade().getDataChecksum());
        transformation.setMajorVersionUpgrade(transformationMajorVersionUpgrade);
    }
    return transformation;
}
Also used : StackGresClusterDbOpsStatus(io.stackgres.common.crd.sgcluster.StackGresClusterDbOpsStatus) ClusterDbOpsStatus(io.stackgres.apiweb.dto.cluster.ClusterDbOpsStatus) ClusterDbOpsMinorVersionUpgradeStatus(io.stackgres.apiweb.dto.cluster.ClusterDbOpsMinorVersionUpgradeStatus) ClusterDbOpsRestartStatus(io.stackgres.apiweb.dto.cluster.ClusterDbOpsRestartStatus) ClusterDbOpsSecurityUpgradeStatus(io.stackgres.apiweb.dto.cluster.ClusterDbOpsSecurityUpgradeStatus) ClusterDbOpsMajorVersionUpgradeStatus(io.stackgres.apiweb.dto.cluster.ClusterDbOpsMajorVersionUpgradeStatus)

Aggregations

ClusterDbOpsMajorVersionUpgradeStatus (io.stackgres.apiweb.dto.cluster.ClusterDbOpsMajorVersionUpgradeStatus)1 ClusterDbOpsMinorVersionUpgradeStatus (io.stackgres.apiweb.dto.cluster.ClusterDbOpsMinorVersionUpgradeStatus)1 ClusterDbOpsRestartStatus (io.stackgres.apiweb.dto.cluster.ClusterDbOpsRestartStatus)1 ClusterDbOpsSecurityUpgradeStatus (io.stackgres.apiweb.dto.cluster.ClusterDbOpsSecurityUpgradeStatus)1 ClusterDbOpsStatus (io.stackgres.apiweb.dto.cluster.ClusterDbOpsStatus)1 StackGresClusterDbOpsStatus (io.stackgres.common.crd.sgcluster.StackGresClusterDbOpsStatus)1