Search in sources :

Example 1 with DbOpsStatus

use of io.stackgres.apiweb.dto.dbops.DbOpsStatus in project stackgres by ongres.

the class DbOpsTransformer method getResourceStatus.

private DbOpsStatus getResourceStatus(StackGresDbOpsStatus source) {
    if (source == null) {
        return null;
    }
    DbOpsStatus transformation = new DbOpsStatus();
    transformation.setConditions(source.getConditions().stream().map(this::getResourceCondition).collect(Collectors.toList()));
    transformation.setOpRetries(source.getOpRetries());
    transformation.setOpStarted(source.getOpStarted());
    transformation.setBenchmark(getResourceBenchmarkStatus(source.getBenchmark()));
    transformation.setMajorVersionUpgrade(getResourceMajorVersionUpgradeStatus(source.getMajorVersionUpgrade()));
    transformation.setRestart(getResourceRestartStatus(source.getRestart()));
    transformation.setMinorVersionUpgrade(getResourceMinorVersionUpgradeStatus(source.getMinorVersionUpgrade()));
    transformation.setSecurityUpgrade(getResourceSecurityUpgradeStatus(source.getSecurityUpgrade()));
    return transformation;
}
Also used : DbOpsStatus(io.stackgres.apiweb.dto.dbops.DbOpsStatus) StackGresDbOpsStatus(io.stackgres.common.crd.sgdbops.StackGresDbOpsStatus)

Aggregations

DbOpsStatus (io.stackgres.apiweb.dto.dbops.DbOpsStatus)1 StackGresDbOpsStatus (io.stackgres.common.crd.sgdbops.StackGresDbOpsStatus)1