summaryrefslogtreecommitdiffstats
path: root/cloud-tenant-cd
diff options
context:
space:
mode:
authorArnstein Ressem <aressem@gmail.com>2020-06-25 13:07:46 +0200
committerGitHub <noreply@github.com>2020-06-25 13:07:46 +0200
commit5e579135ca65fb59f907e8f379b9e7e9e32477d8 (patch)
treef70164f29b20b702d5fdad39c0dbfb3319d7c83a /cloud-tenant-cd
parent192edfaac2a33fc3b20f5c6ef1737347a48f0451 (diff)
Revert "Hide implementation of deployment and endpoint"
Diffstat (limited to 'cloud-tenant-cd')
-rw-r--r--cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/impl/VespaTestRuntime.java3
-rw-r--r--cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/impl/http/HttpDeployment.java (renamed from cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/impl/CloudDeployment.java)10
-rw-r--r--cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/impl/http/HttpEndpoint.java (renamed from cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/impl/CloudEndpoint.java)8
3 files changed, 11 insertions, 10 deletions
diff --git a/cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/impl/VespaTestRuntime.java b/cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/impl/VespaTestRuntime.java
index fe4aefa206d..3a70a1ed531 100644
--- a/cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/impl/VespaTestRuntime.java
+++ b/cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/impl/VespaTestRuntime.java
@@ -7,6 +7,7 @@ import ai.vespa.hosted.api.Properties;
import ai.vespa.hosted.api.TestConfig;
import ai.vespa.hosted.cd.Deployment;
import ai.vespa.hosted.cd.TestRuntime;
+import ai.vespa.hosted.cd.impl.http.HttpDeployment;
import com.yahoo.config.provision.ApplicationId;
import com.yahoo.config.provision.Environment;
import com.yahoo.config.provision.zone.ZoneId;
@@ -36,7 +37,7 @@ public class VespaTestRuntime implements TestRuntime {
}
private VespaTestRuntime(TestConfig config) {
this.config = config;
- this.deploymentToTest = new CloudDeployment(config.deployments().get(config.zone()), new ai.vespa.hosted.auth.EndpointAuthenticator(config.system()));
+ this.deploymentToTest = new HttpDeployment(config.deployments().get(config.zone()), new ai.vespa.hosted.auth.EndpointAuthenticator(config.system()));
}
@Override
diff --git a/cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/impl/CloudDeployment.java b/cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/impl/http/HttpDeployment.java
index 113667c62f3..65210455b85 100644
--- a/cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/impl/CloudDeployment.java
+++ b/cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/impl/http/HttpDeployment.java
@@ -1,5 +1,5 @@
// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package ai.vespa.hosted.cd.impl;
+package ai.vespa.hosted.cd.impl.http;
import ai.vespa.hosted.api.EndpointAuthenticator;
import ai.vespa.hosted.cd.Deployment;
@@ -11,19 +11,19 @@ import java.util.NoSuchElementException;
import java.util.stream.Collectors;
/**
- * A remote deployment of a Vespa application, reachable over HTTP. Contains {@link CloudEndpoint}s.
+ * A remote deployment of a Vespa application, reachable over HTTP. Contains {@link HttpEndpoint}s.
*
* @author jonmv
*/
-class CloudDeployment implements Deployment {
+public class HttpDeployment implements Deployment {
private final Map<String, Endpoint> endpoints;
/** Creates a representation of the given deployment endpoints, using the authenticator for data plane access. */
- CloudDeployment(Map<String, URI> endpoints, EndpointAuthenticator authenticator) {
+ public HttpDeployment(Map<String, URI> endpoints, EndpointAuthenticator authenticator) {
this.endpoints = endpoints.entrySet().stream()
.collect(Collectors.toUnmodifiableMap(entry -> entry.getKey(),
- entry -> new CloudEndpoint(entry.getValue(), authenticator)));
+ entry -> new HttpEndpoint(entry.getValue(), authenticator)));
}
@Override
diff --git a/cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/impl/CloudEndpoint.java b/cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/impl/http/HttpEndpoint.java
index 7d1f97e55f8..f48973b7382 100644
--- a/cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/impl/CloudEndpoint.java
+++ b/cloud-tenant-cd/src/main/java/ai/vespa/hosted/cd/impl/http/HttpEndpoint.java
@@ -1,5 +1,5 @@
// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package ai.vespa.hosted.cd.impl;
+package ai.vespa.hosted.cd.impl.http;
import ai.vespa.hosted.api.EndpointAuthenticator;
import ai.vespa.hosted.cd.Endpoint;
@@ -19,17 +19,17 @@ import static java.nio.charset.StandardCharsets.UTF_8;
import static java.util.Objects.requireNonNull;
/**
- * A remote endpoint in a {@link CloudDeployment} of a Vespa application, reachable over HTTP.
+ * A remote endpoint in a {@link HttpDeployment} of a Vespa application, reachable over HTTP.
*
* @author jonmv
*/
-class CloudEndpoint implements Endpoint {
+public class HttpEndpoint implements Endpoint {
private final URI endpoint;
private final HttpClient client;
private final EndpointAuthenticator authenticator;
- CloudEndpoint(URI endpoint, EndpointAuthenticator authenticator) {
+ public HttpEndpoint(URI endpoint, EndpointAuthenticator authenticator) {
this.endpoint = requireNonNull(endpoint);
this.authenticator = requireNonNull(authenticator);
SSLParameters sslParameters = new SSLParameters();