From a482ab07a7724cafe0376a78281639f2c96a9405 Mon Sep 17 00:00:00 2001 From: Harald Musum Date: Wed, 22 Jan 2020 12:52:51 +0100 Subject: Add method for getting tester status through config server --- .../controller/api/integration/deployment/TesterCloud.java | 5 +++++ .../controller/api/integration/stubs/MockTesterCloud.java | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'controller-api') diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/TesterCloud.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/TesterCloud.java index ef97ef27a72..a395d61e933 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/TesterCloud.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/deployment/TesterCloud.java @@ -1,6 +1,7 @@ // 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.deployment; +import com.yahoo.vespa.hosted.controller.api.identifiers.DeploymentId; import com.yahoo.vespa.hosted.controller.api.integration.LogEntry; import java.net.URI; @@ -22,6 +23,10 @@ public interface TesterCloud { /** Returns the current status of the tester. */ Status getStatus(URI testerUrl); + /** Returns the current status of the tester. */ + // TODO: Remove default implementation when implementors have been updated + default Status getStatus(DeploymentId deploymentId) { return Status.FAILURE; } + /** Returns whether the container is ready to serve. */ boolean ready(URI endpointUrl); diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockTesterCloud.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockTesterCloud.java index ce4d44eadce..e08141c422b 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockTesterCloud.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockTesterCloud.java @@ -1,13 +1,12 @@ // 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.google.common.collect.ImmutableList; +import com.yahoo.vespa.hosted.controller.api.identifiers.DeploymentId; import com.yahoo.vespa.hosted.controller.api.integration.LogEntry; import com.yahoo.vespa.hosted.controller.api.integration.deployment.TesterCloud; import java.net.URI; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import java.util.stream.Collectors; @@ -34,9 +33,10 @@ public class MockTesterCloud implements TesterCloud { } @Override - public Status getStatus(URI testerUrl) { - return status; - } + public Status getStatus(URI testerUrl) { return status; } + + @Override + public Status getStatus(DeploymentId deploymentId) { return status; } @Override public boolean ready(URI testerUrl) { -- cgit v1.2.3