diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2020-11-19 18:29:19 +0100 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2020-11-19 18:29:19 +0100 |
commit | 2c32131a502ec81885649865d850368dda2015fd (patch) | |
tree | 0fccfc4579d599d953b84e1ec5247e9e3e5054ea /controller-server/src | |
parent | 1f65e089ab875952bea5914b9630360145d92b9f (diff) |
Change reindexing HTTP API parameter names
Diffstat (limited to 'controller-server/src')
2 files changed, 5 insertions, 5 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java index 1c0dca26f5a..4d928a6b8a7 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java @@ -1539,11 +1539,11 @@ public class ApplicationApiHandler extends LoggingRequestHandler { private HttpResponse reindex(String tenantName, String applicationName, String instanceName, String environment, String region, HttpRequest request) { ApplicationId id = ApplicationId.from(tenantName, applicationName, instanceName); ZoneId zone = ZoneId.from(environment, region); - List<String> clusterNames = Optional.ofNullable(request.getProperty("cluster")).stream() + List<String> clusterNames = Optional.ofNullable(request.getProperty("clusterId")).stream() .flatMap(clusters -> Stream.of(clusters.split(","))) .filter(cluster -> ! cluster.isBlank()) .collect(toUnmodifiableList()); - List<String> documentTypes = Optional.ofNullable(request.getProperty("type")).stream() + List<String> documentTypes = Optional.ofNullable(request.getProperty("documentType")).stream() .flatMap(types -> Stream.of(types.split(","))) .filter(type -> ! type.isBlank()) .collect(toUnmodifiableList()); 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 7e097304790..5e98ac0d3ee 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 @@ -584,14 +584,14 @@ public class ApplicationApiTest extends ControllerContainerTest { // POST a 'reindex application' command with cluster filter tester.assertResponse(request("/application/v4/tenant/tenant1/application/application1/instance/instance1/environment/prod/region/us-central-1/reindex", POST) - .properties(Map.of("cluster", "boo,moo")) + .properties(Map.of("clusterId", "boo,moo")) .userIdentity(USER_ID), "{\"message\":\"Requested reindexing of tenant1.application1.instance1 in prod.us-central-1, on clusters boo, moo\"}"); // POST a 'reindex application' command with cluster and document type filters tester.assertResponse(request("/application/v4/tenant/tenant1/application/application1/instance/instance1/environment/prod/region/us-central-1/reindex", POST) - .properties(Map.of("cluster", "boo,moo", - "type", "foo,boo")) + .properties(Map.of("clusterId", "boo,moo", + "documentType", "foo,boo")) .userIdentity(USER_ID), "{\"message\":\"Requested reindexing of tenant1.application1.instance1 in prod.us-central-1, on clusters boo, moo, for types foo, boo\"}"); |