@Override public void flushInfrastructureCaches(BakeServiceProvider serviceProvider, DeploymentDetails deploymentDetails, SpinnakerRuntimeSettings runtimeSettings) { throw new HalException(Problem.Severity.FATAL, "This type of deployment does not have an active redis to flush."); } }
@ExceptionHandler({HalException.class}) @ResponseBody public DaemonResponse<Void> handleHalconfigException(HttpServletResponse response, HalException exception) { response.setStatus(exception.getResponseCode()); return new DaemonResponse<>(null, exception.getProblems()); } }
public void failure(HalException e) { inFailedState(); fatalError = e; response = new DaemonResponse<>(null, e.getProblems()); }
public ConfigProblemSetBuilder extend(HalException e) { e.getProblems() .getProblems() .forEach(p -> addProblem(p.getSeverity(), p.getMessage()) .setOptions(p.getOptions()) .setRemediation(p.getRemediation()) ); return this; }
@Override public void rollback( LocalServiceProvider serviceProvider, DeploymentDetails deploymentDetails, SpinnakerRuntimeSettings runtimeSettings, List<SpinnakerService.Type> serviceTypes) { throw new HalException(Problem.Severity.FATAL, "No support for rolling back local deployments yet."); }
public ConfigProblemSetBuilder extend(HalException e) { e.getProblems() .getProblems() .forEach(p -> addProblem(p.getSeverity(), p.getMessage()) .setOptions(p.getOptions()) .setRemediation(p.getRemediation()) ); return this; }
@Override public RemoteAction clean(DeploymentDetails details, SpinnakerRuntimeSettings runtimeSettings) { throw new HalException(Problem.Severity.FATAL, "Bakeable services do not support being uninstalled."); } }
@Override public void flushInfrastructureCaches(BakeServiceProvider serviceProvider, DeploymentDetails deploymentDetails, SpinnakerRuntimeSettings runtimeSettings) { throw new HalException(Problem.Severity.FATAL, "This type of deployment does not have an active redis to flush."); } }
@Override public void rollback( BakeServiceProvider serviceProvider, DeploymentDetails deploymentDetails, SpinnakerRuntimeSettings runtimeSettings, List<SpinnakerService.Type> serviceTypes) { throw new HalException(Problem.Severity.FATAL, "This type of deployment cannot be rolled back."); }
@Override public RemoteAction clean(AccountDeploymentDetails<GoogleAccount> details, SpinnakerRuntimeSettings runtimeSettings) { throw new HalException(Problem.Severity.FATAL, "not yet implemented."); } }
@Override public RemoteAction clean(DeploymentDetails details, SpinnakerRuntimeSettings runtimeSettings) { throw new HalException(Problem.Severity.FATAL, "Bakeable services do not support being uninstalled."); } }
@Override public void rollback( LocalServiceProvider serviceProvider, DeploymentDetails deploymentDetails, SpinnakerRuntimeSettings runtimeSettings, List<SpinnakerService.Type> serviceTypes) { throw new HalException(Problem.Severity.FATAL, "No support for rolling back local deployments yet."); }
@Override public void rollback( BakeServiceProvider serviceProvider, DeploymentDetails deploymentDetails, SpinnakerRuntimeSettings runtimeSettings, List<SpinnakerService.Type> serviceTypes) { throw new HalException(Problem.Severity.FATAL, "This type of deployment cannot be rolled back."); }
@Override protected void collectInstanceLogs( AccountDeploymentDetails<GoogleAccount> details, SpinnakerRuntimeSettings runtimeSettings, File instanceOutputDir, String instanceId) { throw new HalException(Problem.Severity.FATAL, "Not yet implemented."); } }
@Override protected void collectInstanceLogs( AccountDeploymentDetails<GoogleAccount> details, SpinnakerRuntimeSettings runtimeSettings, File instanceOutputDir, String instanceId) { throw new HalException(Problem.Severity.FATAL, "Not yet implemented."); } }
@Override public RemoteAction clean(AccountDeploymentDetails<GoogleAccount> details, SpinnakerRuntimeSettings runtimeSettings) { throw new HalException(Problem.Severity.FATAL, "not yet implemented."); } }
@Override public RemoteAction connectCommand(BakeServiceProvider serviceProvider, DeploymentDetails deploymentDetails, SpinnakerRuntimeSettings runtimeSettings, List<SpinnakerService.Type> serviceTypes) { throw new HalException(Problem.Severity.FATAL, "This type of deployment cannot be run or connected to."); }
@Override public void collectLogs(BakeServiceProvider serviceProvider, DeploymentDetails deploymentDetails, SpinnakerRuntimeSettings runtimeSettings, List<SpinnakerService.Type> serviceTypes) { throw new HalException(Problem.Severity.FATAL, "This type of deployment does not generate logs that can be collected."); }
@Override public void collectLogs(BakeServiceProvider serviceProvider, DeploymentDetails deploymentDetails, SpinnakerRuntimeSettings runtimeSettings, List<SpinnakerService.Type> serviceTypes) { throw new HalException(Problem.Severity.FATAL, "This type of deployment does not generate logs that can be collected."); }
public void backupFile(String name, File file) { String contents; try { contents = IOUtils.toString(new FileInputStream(file)); } catch (IOException e) { throw new HalException(Problem.Severity.FATAL, "Can't load file for secure storage: " + e.getMessage(), e); } storeContents(name, contents); } }