diff options
author | Harald Musum <musum@verizonmedia.com> | 2019-03-05 09:32:16 +0100 |
---|---|---|
committer | Harald Musum <musum@verizonmedia.com> | 2019-03-05 09:32:16 +0100 |
commit | aed78adc25566536364d866c4c38c65155ac6cc2 (patch) | |
tree | ff7d12209542f69b82c413529532355b87f915e4 /controller-api/src | |
parent | 0c20251bd96b6f734679bb7c9f11fd101d46c7d2 (diff) |
Deactivate should return NotFoundException
Handle that internally in controller and add a test for it
Diffstat (limited to 'controller-api/src')
3 files changed, 13 insertions, 12 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServer.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServer.java index 9a75764befe..07eaf046eeb 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServer.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServer.java @@ -23,6 +23,7 @@ import java.util.Set; public interface ConfigServer { interface PreparedApplication { + // TODO: Remove the two methods below void activate(); List<Log> messages(); PrepareResponse prepareResponse(); @@ -32,7 +33,7 @@ public interface ConfigServer { void restart(DeploymentId deployment, Optional<Hostname> hostname); - void deactivate(DeploymentId deployment) throws NoInstanceException; + void deactivate(DeploymentId deployment) throws NotFoundException; boolean isSuspended(DeploymentId deployment); diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/NoInstanceException.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/NoInstanceException.java deleted file mode 100644 index a415721407f..00000000000 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/NoInstanceException.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright 2017 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.configserver; - -/** - * @author Tony Vaagenes - */ -public class NoInstanceException extends Exception { - public NoInstanceException(String msg) { - super(msg); - } -} diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/NotFoundException.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/NotFoundException.java new file mode 100644 index 00000000000..5f0e4f8e551 --- /dev/null +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/NotFoundException.java @@ -0,0 +1,11 @@ +// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.vespa.hosted.controller.api.integration.configserver; + +/** + * @author Tony Vaagenes + */ +public class NotFoundException extends Exception { + public NotFoundException(String msg) { + super(msg); + } +} |