diff options
author | Morten Tokle <mortent@oath.com> | 2019-04-03 10:31:04 +0200 |
---|---|---|
committer | Morten Tokle <mortent@oath.com> | 2019-04-03 10:31:04 +0200 |
commit | ab45d177830211a774b6cf6b047218d081b58bf3 (patch) | |
tree | 62962c12acfff00929b01ac5895a1af2127a8749 /controller-server | |
parent | 0965dca655ee4c9c88cc584819389e89dc10dea6 (diff) |
Allow restarts in all environments
Diffstat (limited to 'controller-server')
2 files changed, 16 insertions, 2 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/role/PathGroup.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/role/PathGroup.java index fdcd70fc0d1..ef97421119f 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/role/PathGroup.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/role/PathGroup.java @@ -59,8 +59,7 @@ public enum PathGroup { /** Path used to restart application nodes. */ // TODO move to the above when everyone is on new pipeline. applicationRestart(Matcher.tenant, Matcher.application, - "/application/v4/tenant/{tenant}/application/{application}/environment/prod/region/{region}/instance/{ignored}/restart"), - + "/application/v4/tenant/{tenant}/application/{application}/environment/{environment}/region/{region}/instance/{ignored}/restart"), /** Paths used for development deployments. */ developmentDeployment(Matcher.tenant, Matcher.application, diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java index 8c28c289889..40d39248cb5 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiTest.java @@ -461,6 +461,21 @@ public class ApplicationApiTest extends ControllerContainerTest { .screwdriverIdentity(SCREWDRIVER_ID), "Requested restart of tenant/tenant1/application/application1/environment/prod/region/us-central-1/instance/default"); + // POST a 'restart application' in staging environment command + tester.assertResponse(request("/application/v4/tenant/tenant1/application/application1/environment/staging/region/us-central-1/instance/default/restart", POST) + .screwdriverIdentity(SCREWDRIVER_ID), + "Requested restart of tenant/tenant1/application/application1/environment/staging/region/us-central-1/instance/default"); + + // POST a 'restart application' in staging test command + tester.assertResponse(request("/application/v4/tenant/tenant1/application/application1/environment/test/region/us-central-1/instance/default/restart", POST) + .screwdriverIdentity(SCREWDRIVER_ID), + "Requested restart of tenant/tenant1/application/application1/environment/test/region/us-central-1/instance/default"); + + // POST a 'restart application' in staging dev command + tester.assertResponse(request("/application/v4/tenant/tenant1/application/application1/environment/dev/region/us-central-1/instance/default/restart", POST) + .userIdentity(USER_ID), + "Requested restart of tenant/tenant1/application/application1/environment/dev/region/us-central-1/instance/default"); + // POST a 'restart application' command with a host filter (other filters not supported yet) tester.assertResponse(request("/application/v4/tenant/tenant1/application/application1/environment/prod/region/us-central-1/instance/default/restart?hostname=host1", POST) .screwdriverIdentity(SCREWDRIVER_ID), |