use of com.sequenceiq.freeipa.api.model.Backup in project cloudbreak by hortonworks.
the class StackToCloudStackConverter method buildFileSystemView.
public Optional<CloudFileSystemView> buildFileSystemView(Stack stack) {
Telemetry telemetry = stack.getTelemetry();
Backup backup = stack.getBackup();
Optional<CloudFileSystemView> fileSystemView = Optional.empty();
if (telemetry != null && telemetry.getLogging() != null && backup != null) {
checkLoggingAndBackupFileSystemConflicting(telemetry.getLogging(), backup);
}
if (telemetry != null && telemetry.getLogging() != null) {
fileSystemView = buildFileSystemViewFromTelemetry(telemetry.getLogging());
}
if (fileSystemView.isEmpty() && backup != null) {
fileSystemView = buildFileSystemViewFromBackup(backup);
}
return fileSystemView;
}
use of com.sequenceiq.freeipa.api.model.Backup in project cloudbreak by hortonworks.
the class BackupConverter method convert.
public Backup convert(BackupRequest request) {
Backup backup = null;
if (freeIpaBackupEnabled && request != null) {
backup = new Backup();
backup.setMonthlyFullEnabled(backupConfiguration.isMonthlyFullEnabled());
backup.setInitialFullEnabled(backupConfiguration.isRunInitialFullAfterInstall());
backup.setHourlyEnabled(backupConfiguration.isHourlyEnabled());
decorateBackupFromBackupRequest(backup, request);
}
return backup;
}
use of com.sequenceiq.freeipa.api.model.Backup in project cloudbreak by hortonworks.
the class BackupConverter method convert.
public Backup convert(TelemetryRequest request) {
Backup backup = null;
if (freeIpaBackupEnabled && request != null && request.getLogging() != null) {
backup = new Backup();
backup.setMonthlyFullEnabled(backupConfiguration.isMonthlyFullEnabled());
backup.setInitialFullEnabled(backupConfiguration.isRunInitialFullAfterInstall());
backup.setHourlyEnabled(backupConfiguration.isHourlyEnabled());
decorateBackupFromLoggingRequest(backup, request.getLogging());
}
return backup;
}
use of com.sequenceiq.freeipa.api.model.Backup in project cloudbreak by hortonworks.
the class CloudBackupFolderResolverServiceTest method testUpdateStorageLocationWithoutBackup.
@Test
public void testUpdateStorageLocationWithoutBackup() {
// GIVEN
Backup backup = null;
// WHEN
underTest.updateStorageLocation(backup, FluentClusterType.FREEIPA.value(), "mycluster", "crn:cdp:cloudbreak:us-west-1:someone:stack:12345");
// THEN
assertNull(backup);
}
use of com.sequenceiq.freeipa.api.model.Backup in project cloudbreak by hortonworks.
the class CloudBackupFolderResolverServiceTest method testUpdateStorageLocationWithInvalidCrn.
@Test(expected = CrnParseException.class)
public void testUpdateStorageLocationWithInvalidCrn() {
// GIVEN
Backup backup = createBackup();
// WHEN
underTest.updateStorageLocation(backup, FluentClusterType.FREEIPA.value(), "mycluster", "crn:cdp:cloudbreak:us-west:someone:stack:12345");
}
Aggregations