summaryrefslogtreecommitdiffstats
path: root/controller-api
diff options
context:
space:
mode:
authorValerij Fredriksen <freva@users.noreply.github.com>2018-06-22 08:50:50 +0200
committerGitHub <noreply@github.com>2018-06-22 08:50:50 +0200
commit0041440b22ea63f22d4848f62fa690babc2b872e (patch)
tree97c53b943efa9542aa239ebf487a5b543b579149 /controller-api
parent35f7edea4453df5b74fdb407a90e069239ce1817 (diff)
parent0a49b88207911860a9c3babb3c9c341c23a505cc (diff)
Merge pull request #6262 from vespa-engine/revert-6253-freva/add-log-store
Revert "Inject LogStore"
Diffstat (limited to 'controller-api')
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/LogStore.java26
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockLogStore.java55
2 files changed, 8 insertions, 73 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/LogStore.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/LogStore.java
index a4093bc80af..0a7bacefffb 100644
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/LogStore.java
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/LogStore.java
@@ -1,29 +1,19 @@
package com.yahoo.vespa.hosted.controller.api.integration;
import com.yahoo.config.provision.ApplicationId;
-import com.yahoo.vespa.hosted.controller.api.integration.configserver.PrepareResponse;
import com.yahoo.vespa.hosted.controller.api.integration.deployment.JobType;
+import com.yahoo.vespa.hosted.controller.api.integration.zone.ZoneId;
+// TODO jvenstad: Change most of this.
public interface LogStore {
- /** @return the test log of the given deployment job. */
- String getTestLog(ApplicationId applicationId, JobType jobType, long buildId);
+ /** Returns the log of the given deployment job. */
+ String getTestLog(ApplicationId application, JobType jobType, int build);
- /** Stores the given test log for the given deployment job. */
- void setTestLog(ApplicationId applicationId, JobType jobType, long buildId, String testLog);
+ /** Stores the given log for the given deployment job. */
+ void setTestLog(ApplicationId application, JobType jobType, int build, String log);
- /** @return the convergence log of the given deployment job. */
- String getConvergenceLog(ApplicationId applicationId, JobType jobType, long buildId);
+ /** Deletes the log for the given deployment job. */
+ void deleteTestLog(ApplicationId application, JobType jobType, int build);
- /** Stores the given convergence log for the given deployment job. */
- void setConvergenceLog(ApplicationId applicationId, JobType jobType, long buildId, String convergenceLog);
-
- /** @return the result of prepare of the test application for the given deployment job. */
- PrepareResponse getPrepareResponse(ApplicationId applicationId, JobType jobType, long buildId);
-
- /** Stores the given result of prepare of the test application for the given deployment job. */
- void setPrepareResponse(ApplicationId applicationId, JobType jobType, long buildId, PrepareResponse prepareResponse);
-
- /** Deletes all data associated with test of a given deployment job */
- void deleteTestData(ApplicationId applicationId, JobType jobType, long buildId);
}
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockLogStore.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockLogStore.java
deleted file mode 100644
index 9ec547c2e0e..00000000000
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockLogStore.java
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.vespa.hosted.controller.api.integration.stubs;
-
-import com.yahoo.config.provision.ApplicationId;
-import com.yahoo.vespa.hosted.controller.api.application.v4.model.configserverbindings.ConfigChangeActions;
-import com.yahoo.vespa.hosted.controller.api.identifiers.TenantId;
-import com.yahoo.vespa.hosted.controller.api.integration.LogStore;
-import com.yahoo.vespa.hosted.controller.api.integration.configserver.PrepareResponse;
-import com.yahoo.vespa.hosted.controller.api.integration.deployment.JobType;
-
-import java.util.Collections;
-
-/**
- * @author freva
- */
-public class MockLogStore implements LogStore {
- @Override
- public String getTestLog(ApplicationId applicationId, JobType jobType, long buildId) {
- return "SUCCESS";
- }
-
- @Override
- public void setTestLog(ApplicationId applicationId, JobType jobType, long buildId, String testLog) {
-
- }
-
- @Override
- public String getConvergenceLog(ApplicationId applicationId, JobType jobType, long buildId) {
- return "SUCCESS";
- }
-
- @Override
- public void setConvergenceLog(ApplicationId applicationId, JobType jobType, long buildId, String convergenceLog) {
-
- }
-
- @Override
- public PrepareResponse getPrepareResponse(ApplicationId applicationId, JobType jobType, long buildId) {
- PrepareResponse prepareResponse = new PrepareResponse();
- prepareResponse.message = "foo";
- prepareResponse.configChangeActions = new ConfigChangeActions(Collections.emptyList(),
- Collections.emptyList());
- prepareResponse.tenant = new TenantId("tenant");
- return prepareResponse; }
-
- @Override
- public void setPrepareResponse(ApplicationId applicationId, JobType jobType, long buildId, PrepareResponse prepareResponse) {
-
- }
-
- @Override
- public void deleteTestData(ApplicationId applicationId, JobType jobType, long buildId) {
-
- }
-}