use of com.yahoo.vespa.config.server.http.v2.PrepareResult in project vespa by vespa-engine.
the class ApplicationRepository method prepare.
public PrepareResult prepare(Tenant tenant, long sessionId, PrepareParams prepareParams, Instant now) {
validateThatLocalSessionIsNotActive(tenant, sessionId);
LocalSession session = getLocalSession(tenant, sessionId);
ApplicationId applicationId = prepareParams.getApplicationId();
Optional<ApplicationSet> currentActiveApplicationSet = getCurrentActiveApplicationSet(tenant, applicationId);
Slime deployLog = createDeployLog();
DeployLogger logger = new DeployHandlerLogger(deployLog.get().setArray("log"), prepareParams.isVerbose(), applicationId);
ConfigChangeActions actions = session.prepare(logger, prepareParams, currentActiveApplicationSet, tenant.getPath(), now);
logConfigChangeActions(actions, logger);
log.log(LogLevel.INFO, Tenants.logPre(applicationId) + "Session " + sessionId + " prepared successfully. ");
return new PrepareResult(sessionId, actions, deployLog);
}
use of com.yahoo.vespa.config.server.http.v2.PrepareResult in project vespa by vespa-engine.
the class ApplicationRepository method prepareAndActivate.
public PrepareResult prepareAndActivate(Tenant tenant, long sessionId, PrepareParams prepareParams, boolean ignoreLockFailure, boolean ignoreSessionStaleFailure, Instant now) {
PrepareResult result = prepare(tenant, sessionId, prepareParams, now);
activate(tenant, sessionId, prepareParams.getTimeoutBudget(), ignoreLockFailure, ignoreSessionStaleFailure);
return result;
}
use of com.yahoo.vespa.config.server.http.v2.PrepareResult in project vespa by vespa-engine.
the class ApplicationRepositoryTest method createAndPrepareAndActivate.
@Test
public void createAndPrepareAndActivate() throws IOException {
PrepareResult result = createAndPrepareAndActivateApp();
assertTrue(result.configChangeActions().getRefeedActions().isEmpty());
assertTrue(result.configChangeActions().getRestartActions().isEmpty());
}
use of com.yahoo.vespa.config.server.http.v2.PrepareResult in project vespa by vespa-engine.
the class ApplicationRepositoryTest method prepareAndActivate.
@Test
public void prepareAndActivate() throws IOException {
PrepareResult result = prepareAndActivateApp(testApp);
assertTrue(result.configChangeActions().getRefeedActions().isEmpty());
assertTrue(result.configChangeActions().getRestartActions().isEmpty());
}
use of com.yahoo.vespa.config.server.http.v2.PrepareResult in project vespa by vespa-engine.
the class ApplicationRepositoryTest method prepareAndActivateWithRestart.
@Test
public void prepareAndActivateWithRestart() throws IOException {
prepareAndActivateApp(testAppJdiscOnly);
PrepareResult result = prepareAndActivateApp(testApp);
assertTrue(result.configChangeActions().getRefeedActions().isEmpty());
assertFalse(result.configChangeActions().getRestartActions().isEmpty());
}
Aggregations