use of com.yahoo.vespa.hosted.controller.api.identifiers.Hostname in project vespa by vespa-engine.
the class ApplicationApiHandler method restart.
/**
* Schedule restart of deployment, or specific host in a deployment
*/
private HttpResponse restart(String tenantName, String applicationName, String instanceName, String environment, String region, HttpRequest request) {
DeploymentId deploymentId = new DeploymentId(ApplicationId.from(tenantName, applicationName, instanceName), ZoneId.from(environment, region));
// TODO: Propagate all filters
Optional<Hostname> hostname = Optional.ofNullable(request.getProperty("hostname")).map(Hostname::new);
controller.applications().restart(deploymentId, hostname);
// TODO: Change to return JSON
return new StringResponse("Requested restart of " + path(TenantResource.API_PATH, tenantName, ApplicationResource.API_PATH, applicationName, EnvironmentResource.API_PATH, environment, "region", region, "instance", instanceName));
}
Aggregations