diff options
author | Jon Marius Venstad <jonmv@users.noreply.github.com> | 2018-01-23 12:17:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-23 12:17:10 +0100 |
commit | 8c66ba1362e8f6da51ae854c6d5df513c1ecf88b (patch) | |
tree | dcd132daf5b5649cc13f67abceb7eaff38164878 /controller-api | |
parent | 478a26e7b0da84c9911ba3b616d244633245698f (diff) | |
parent | fe37921c3e6acc4086af13c204df657121b7b14d (diff) |
Merge pull request #4721 from vespa-engine/jvenstad/secure-endpoints
Pass new secure global endpoint in deployment
Diffstat (limited to 'controller-api')
5 files changed, 8 insertions, 53 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServerClient.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServerClient.java index 086696fc6a4..852629768c5 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServerClient.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/configserver/ConfigServerClient.java @@ -7,7 +7,6 @@ import com.yahoo.vespa.hosted.controller.api.application.v4.model.DeployOptions; import com.yahoo.vespa.hosted.controller.api.application.v4.model.EndpointStatus; import com.yahoo.vespa.hosted.controller.api.identifiers.DeploymentId; import com.yahoo.vespa.hosted.controller.api.identifiers.Hostname; -import com.yahoo.vespa.hosted.controller.api.rotation.Rotation; import com.yahoo.vespa.serviceview.bindings.ApplicationView; import java.io.IOException; @@ -28,7 +27,7 @@ public interface ConfigServerClient { PrepareResponse prepareResponse(); } - PreparedApplication prepare(DeploymentId applicationInstance, DeployOptions deployOptions, Set<String> rotationCnames, Set<Rotation> rotations, byte[] content); + PreparedApplication prepare(DeploymentId applicationInstance, DeployOptions deployOptions, Set<String> rotationCnames, Set<String> rotationNames, byte[] content); List<String> getNodeQueryHost(DeploymentId applicationInstance, String type) throws NoInstanceException; diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dns/MemoryNameService.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dns/MemoryNameService.java index ec9cf0b3436..06599aa0b82 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dns/MemoryNameService.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dns/MemoryNameService.java @@ -4,9 +4,11 @@ package com.yahoo.vespa.hosted.controller.api.integration.dns; import java.util.Collections; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Optional; import java.util.UUID; +import java.util.stream.Collectors; /** * An in-memory name service for testing purposes. @@ -36,11 +38,10 @@ public class MemoryNameService implements NameService { } @Override - public Optional<Record> findRecord(Record.Type type, RecordData data) { - return records.values() - .stream() + public List<Record> findRecord(Record.Type type, RecordData data) { + return records.values().stream() .filter(record -> record.type() == type && record.data().equals(data)) - .findFirst(); + .collect(Collectors.toList()); } @Override diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dns/NameService.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dns/NameService.java index 078a7e7cefb..1d341f06f90 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dns/NameService.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dns/NameService.java @@ -1,6 +1,7 @@ // 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.integration.dns; +import java.util.List; import java.util.Optional; /** @@ -22,7 +23,7 @@ public interface NameService { Optional<Record> findRecord(Record.Type type, RecordName name); /** Find record by type and data */ - Optional<Record> findRecord(Record.Type type, RecordData data); + List<Record> findRecord(Record.Type type, RecordData data); /** Update existing record */ void updateRecord(RecordId id, RecordData newData); diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/rotation/Rotation.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/rotation/Rotation.java deleted file mode 100644 index a1f78302e4b..00000000000 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/rotation/Rotation.java +++ /dev/null @@ -1,41 +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.rotation; - -import com.yahoo.vespa.hosted.controller.api.identifiers.RotationId; - -import java.util.Objects; - -/** - * Represents a global routing rotation. - * - * @author Oyvind Gronnesby - */ -// TODO: Used in serialization (ConfigServerClient). This should be removed and config server client should use a -// Set<String> instead, like it does for CNAMEs. -public class Rotation { - - /** The ID of the allocated rotation. This value is generated by global routing system. */ - public final RotationId rotationId; - - /** The global name which the allocated rotation points to */ - public final String rotationName; - - public Rotation(RotationId rotationId, String rotationName) { - this.rotationId = Objects.requireNonNull(rotationId); - this.rotationName = Objects.requireNonNull(rotationName); - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof Rotation)) return false; - final Rotation rotation = (Rotation) o; - return rotationId.equals(rotation.rotationId) && rotationName.equals(rotation.rotationName); - } - - @Override - public int hashCode() { - return Objects.hash(rotationId, rotationName); - } - -} diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/rotation/package-info.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/rotation/package-info.java deleted file mode 100644 index 1626158a489..00000000000 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/rotation/package-info.java +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -@ExportPackage -package com.yahoo.vespa.hosted.controller.api.rotation; - -import com.yahoo.osgi.annotation.ExportPackage; |