Skip to content

Commit 02b1bf3

Browse files
committed
Rename capability
1 parent f78dbac commit 02b1bf3

File tree

11 files changed

+17
-17
lines changed

11 files changed

+17
-17
lines changed

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/cluster.desired_balance/10_basic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ setup:
184184
capabilities:
185185
- method: DELETE
186186
path: /_internal/desired_balance
187-
capabilities: [ plain_text_response ]
187+
capabilities: [ plain_text_empty_response ]
188188

189189
- do:
190190
_internal.delete_desired_balance: { }

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/cluster.desired_nodes/10_basic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ setup:
77
capabilities:
88
- method: DELETE
99
path: /_internal/desired_nodes
10-
capabilities: [ plain_text_response ]
10+
capabilities: [ plain_text_empty_response ]
1111
---
1212
teardown:
1313
- do:

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/cluster.desired_nodes/11_old_format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ setup:
1010
capabilities:
1111
- method: DELETE
1212
path: /_internal/desired_nodes
13-
capabilities: [ plain_text_response ]
13+
capabilities: [ plain_text_empty_response ]
1414
---
1515
teardown:
1616
- do:

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/cluster.desired_nodes/20_dry_run.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ setup:
77
capabilities:
88
- method: DELETE
99
path: /_internal/desired_nodes
10-
capabilities: [ plain_text_response ]
10+
capabilities: [ plain_text_empty_response ]
1111
---
1212
teardown:
1313
- do:

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/cluster.voting_config_exclusions/10_basic.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ setup:
44
capabilities:
55
- method: POST
66
path: /_cluster/voting_config_exclusions
7-
capabilities: [ plain_text_response ]
7+
capabilities: [ plain_text_empty_response ]
88
- method: DELETE
99
path: /_cluster/voting_config_exclusions
10-
capabilities: [ plain_text_response ]
10+
capabilities: [ plain_text_empty_response ]
1111
reason: needs these capabilities
1212

1313
---

server/src/main/java/org/elasticsearch/rest/action/EmptyResponseListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ public RestResponse buildResponse(ActionResponse.Empty ignored) throws Exception
3434
* Capability name for APIs that previously would return an invalid zero-byte {@code application/json} response so that the YAML test
3535
* runner can avoid those APIs.
3636
*/
37-
public static final String PLAIN_TEXT_RESPONSE_CAPABILITY_NAME = "plain_text_response";
37+
public static final String PLAIN_TEXT_EMPTY_RESPONSE_CAPABILITY_NAME = "plain_text_empty_response";
3838
}

server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestAddVotingConfigExclusionAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
import static org.elasticsearch.rest.RestRequest.Method.POST;
2626
import static org.elasticsearch.rest.RestUtils.getMasterNodeTimeout;
27-
import static org.elasticsearch.rest.action.EmptyResponseListener.PLAIN_TEXT_RESPONSE_CAPABILITY_NAME;
27+
import static org.elasticsearch.rest.action.EmptyResponseListener.PLAIN_TEXT_EMPTY_RESPONSE_CAPABILITY_NAME;
2828

2929
public class RestAddVotingConfigExclusionAction extends BaseRestHandler {
3030
private static final TimeValue DEFAULT_TIMEOUT = TimeValue.timeValueSeconds(30L);
@@ -41,7 +41,7 @@ public List<Route> routes() {
4141

4242
@Override
4343
public Set<String> supportedCapabilities() {
44-
return Set.of(PLAIN_TEXT_RESPONSE_CAPABILITY_NAME);
44+
return Set.of(PLAIN_TEXT_EMPTY_RESPONSE_CAPABILITY_NAME);
4545
}
4646

4747
@Override

server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestClearVotingConfigExclusionsAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
import static org.elasticsearch.rest.RestRequest.Method.DELETE;
2424
import static org.elasticsearch.rest.RestUtils.getMasterNodeTimeout;
25-
import static org.elasticsearch.rest.action.EmptyResponseListener.PLAIN_TEXT_RESPONSE_CAPABILITY_NAME;
25+
import static org.elasticsearch.rest.action.EmptyResponseListener.PLAIN_TEXT_EMPTY_RESPONSE_CAPABILITY_NAME;
2626

2727
public class RestClearVotingConfigExclusionsAction extends BaseRestHandler {
2828

@@ -43,7 +43,7 @@ public String getName() {
4343

4444
@Override
4545
public Set<String> supportedCapabilities() {
46-
return Set.of(PLAIN_TEXT_RESPONSE_CAPABILITY_NAME);
46+
return Set.of(PLAIN_TEXT_EMPTY_RESPONSE_CAPABILITY_NAME);
4747
}
4848

4949
@Override

server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestDeleteDesiredBalanceAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import java.util.List;
2424
import java.util.Set;
2525

26-
import static org.elasticsearch.rest.action.EmptyResponseListener.PLAIN_TEXT_RESPONSE_CAPABILITY_NAME;
26+
import static org.elasticsearch.rest.action.EmptyResponseListener.PLAIN_TEXT_EMPTY_RESPONSE_CAPABILITY_NAME;
2727

2828
@ServerlessScope(Scope.INTERNAL)
2929
public class RestDeleteDesiredBalanceAction extends BaseRestHandler {
@@ -40,7 +40,7 @@ public List<Route> routes() {
4040

4141
@Override
4242
public Set<String> supportedCapabilities() {
43-
return Set.of(PLAIN_TEXT_RESPONSE_CAPABILITY_NAME);
43+
return Set.of(PLAIN_TEXT_EMPTY_RESPONSE_CAPABILITY_NAME);
4444
}
4545

4646
@Override

server/src/main/java/org/elasticsearch/rest/action/admin/cluster/RestDeleteDesiredNodesAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
import static org.elasticsearch.rest.RestUtils.getAckTimeout;
2424
import static org.elasticsearch.rest.RestUtils.getMasterNodeTimeout;
25-
import static org.elasticsearch.rest.action.EmptyResponseListener.PLAIN_TEXT_RESPONSE_CAPABILITY_NAME;
25+
import static org.elasticsearch.rest.action.EmptyResponseListener.PLAIN_TEXT_EMPTY_RESPONSE_CAPABILITY_NAME;
2626

2727
public class RestDeleteDesiredNodesAction extends BaseRestHandler {
2828
@Override
@@ -37,7 +37,7 @@ public List<Route> routes() {
3737

3838
@Override
3939
public Set<String> supportedCapabilities() {
40-
return Set.of(PLAIN_TEXT_RESPONSE_CAPABILITY_NAME);
40+
return Set.of(PLAIN_TEXT_EMPTY_RESPONSE_CAPABILITY_NAME);
4141
}
4242

4343
@Override

0 commit comments

Comments
 (0)