summaryrefslogtreecommitdiffstats
path: root/controller-api
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2021-03-18 15:38:37 +0100
committerMartin Polden <mpolden@mpolden.no>2021-03-18 15:38:37 +0100
commit36eb3e232b50eaa3fb687e6a049214633759b5c6 (patch)
treea028f38c0ebb776c0b502907d8f4d69ab30e9747 /controller-api
parentbf685b2e30e26218cf6278a3d9f5321f1b9517e9 (diff)
Remove unused DeployOptions
Diffstat (limited to 'controller-api')
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/DeployOptions.java46
-rw-r--r--controller-api/src/test/java/com/yahoo/vespa/hosted/controller/api/identifiers/DeployOptionsTest.java31
2 files changed, 0 insertions, 77 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/DeployOptions.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/DeployOptions.java
deleted file mode 100644
index 255684d0b66..00000000000
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/application/v4/model/DeployOptions.java
+++ /dev/null
@@ -1,46 +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.application.v4.model;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.yahoo.component.Version;
-
-import java.util.Optional;
-
-/**
- * @author gjoranv
- */
-@JsonIgnoreProperties(ignoreUnknown = true)
-public class DeployOptions {
-
- public final boolean deployDirectly;
- public final Optional<String> vespaVersion;
- public final boolean ignoreValidationErrors;
- public final boolean deployCurrentVersion;
-
- @JsonCreator
- public DeployOptions(@JsonProperty("deployDirectly") boolean deployDirectly,
- @JsonProperty("vespaVersion") Optional<Version> vespaVersion,
- @JsonProperty("ignoreValidationErrors") boolean ignoreValidationErrors,
- @JsonProperty("deployCurrentVersion") boolean deployCurrentVersion) {
- this.deployDirectly = deployDirectly;
- this.vespaVersion = vespaVersion.map(Version::toString);
- this.ignoreValidationErrors = ignoreValidationErrors;
- this.deployCurrentVersion = deployCurrentVersion;
- }
-
- @Override
- public String toString() {
- return "DeployData{" +
- "deployDirectly=" + deployDirectly +
- ", vespaVersion=" + vespaVersion.orElse("None") +
- ", ignoreValidationErrors=" + ignoreValidationErrors +
- ", deployCurrentVersion=" + deployCurrentVersion +
- '}';
- }
-
- public static DeployOptions none() {
- return new DeployOptions(false, Optional.empty(), false, false);
- }
-}
diff --git a/controller-api/src/test/java/com/yahoo/vespa/hosted/controller/api/identifiers/DeployOptionsTest.java b/controller-api/src/test/java/com/yahoo/vespa/hosted/controller/api/identifiers/DeployOptionsTest.java
deleted file mode 100644
index a97fde0a6d6..00000000000
--- a/controller-api/src/test/java/com/yahoo/vespa/hosted/controller/api/identifiers/DeployOptionsTest.java
+++ /dev/null
@@ -1,31 +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.identifiers;
-
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
-import com.yahoo.component.Version;
-import com.yahoo.vespa.hosted.controller.api.application.v4.model.DeployOptions;
-import org.junit.Test;
-
-import java.io.IOException;
-import java.util.Optional;
-
-import static org.junit.Assert.assertEquals;
-
-/**
- * @author mortent
- */
-public class DeployOptionsTest {
-
- @Test
- public void it_serializes_version() throws IOException {
- DeployOptions options = new DeployOptions(false, Optional.of(new Version("6.98.227")), false, false);
- final ObjectMapper objectMapper = new ObjectMapper()
- .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
- .registerModule(new Jdk8Module());
-
- String string = objectMapper.writeValueAsString(options);
- assertEquals("{\"deployDirectly\":false,\"vespaVersion\":\"6.98.227\",\"ignoreValidationErrors\":false,\"deployCurrentVersion\":false}", string);
- }
-}