diff options
author | Martin Polden <mpolden@mpolden.no> | 2018-03-14 15:06:20 +0100 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2018-03-14 15:06:20 +0100 |
commit | 9bd947289f3f67e0df1a44f8bd55ac110b904c69 (patch) | |
tree | 493bfe08ccc605c3e787fecf3eb8e7026b774833 /orchestrator-restapi/src | |
parent | d0b2ffd151865421b4479d60bd52e211aa09c809 (diff) |
Remove deprecated suspend API
Diffstat (limited to 'orchestrator-restapi/src')
2 files changed, 0 insertions, 74 deletions
diff --git a/orchestrator-restapi/src/main/java/com/yahoo/vespa/orchestrator/restapi/HostSuspensionApi.java b/orchestrator-restapi/src/main/java/com/yahoo/vespa/orchestrator/restapi/HostSuspensionApi.java index a9846134eff..603d6a1adac 100644 --- a/orchestrator-restapi/src/main/java/com/yahoo/vespa/orchestrator/restapi/HostSuspensionApi.java +++ b/orchestrator-restapi/src/main/java/com/yahoo/vespa/orchestrator/restapi/HostSuspensionApi.java @@ -1,7 +1,6 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.orchestrator.restapi; -import com.yahoo.vespa.orchestrator.restapi.wire.BatchHostSuspendRequest; import com.yahoo.vespa.orchestrator.restapi.wire.BatchOperationResult; import javax.ws.rs.Consumes; @@ -32,12 +31,6 @@ public interface HostSuspensionApi { * batch-requests for suspension of hosts succeed. */ @PUT - @Produces(MediaType.APPLICATION_JSON) - @Consumes(MediaType.APPLICATION_JSON) - @Deprecated // TODO: Remove after 2018-04-01 - BatchOperationResult suspendAll(BatchHostSuspendRequest request); - - @PUT @Path("/{hostname}") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) diff --git a/orchestrator-restapi/src/main/java/com/yahoo/vespa/orchestrator/restapi/wire/BatchHostSuspendRequest.java b/orchestrator-restapi/src/main/java/com/yahoo/vespa/orchestrator/restapi/wire/BatchHostSuspendRequest.java deleted file mode 100644 index 3dc28f53217..00000000000 --- a/orchestrator-restapi/src/main/java/com/yahoo/vespa/orchestrator/restapi/wire/BatchHostSuspendRequest.java +++ /dev/null @@ -1,67 +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.orchestrator.restapi.wire; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.annotation.concurrent.Immutable; -import java.util.Collections; -import java.util.List; - -@Immutable -public class BatchHostSuspendRequest { - public static final String PARENT_HOSTNAME_FIELD = "parentHostname"; - public static final String HOSTNAMES_FIELD = "hostnames"; - - public final String parentHostname; - public final List<String> hostnames; - - @JsonCreator - public BatchHostSuspendRequest( - @JsonProperty(PARENT_HOSTNAME_FIELD) String parentHostname, - @JsonProperty(HOSTNAMES_FIELD) List<String> hostnames) { - this.parentHostname = parentHostname; - this.hostnames = Collections.unmodifiableList(hostnames); - } - - /** - * @return The hostname of the parent of the hostnames, if applicable, which can be used for debugging. - */ - @JsonProperty(PARENT_HOSTNAME_FIELD) - public String getParentHostname() { - return parentHostname; - } - - @JsonProperty(HOSTNAMES_FIELD) - public List<String> getHostnames() { - return hostnames; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - BatchHostSuspendRequest that = (BatchHostSuspendRequest) o; - - if (parentHostname != null ? !parentHostname.equals(that.parentHostname) : that.parentHostname != null) - return false; - return hostnames != null ? hostnames.equals(that.hostnames) : that.hostnames == null; - - } - - @Override - public int hashCode() { - int result = parentHostname != null ? parentHostname.hashCode() : 0; - result = 31 * result + (hostnames != null ? hostnames.hashCode() : 0); - return result; - } - - @Override - public String toString() { - return "BatchHostSuspendRequest{" + - "parentHostname=" + parentHostname + - ", hostnames=" + hostnames + - '}'; - } -} |