aboutsummaryrefslogtreecommitdiffstats
path: root/hosted-api
diff options
context:
space:
mode:
authorJon Marius Venstad <venstad@gmail.com>2019-10-07 09:05:10 +0200
committerJon Marius Venstad <venstad@gmail.com>2019-10-07 09:05:10 +0200
commitfb16b8f37bae65a8120a300600a7f430a8af1445 (patch)
tree98fb04d38f45bc0d85ed980ac67a349fded3095f /hosted-api
parent969ef6519225f5a875e70628d0b5c4ba1a9477cf (diff)
Move definition of data plane key/cert to Properties, and rename api things
Diffstat (limited to 'hosted-api')
-rw-r--r--hosted-api/src/main/java/ai/vespa/hosted/api/Properties.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/hosted-api/src/main/java/ai/vespa/hosted/api/Properties.java b/hosted-api/src/main/java/ai/vespa/hosted/api/Properties.java
index 0ca1b3e5603..68c8ba389d2 100644
--- a/hosted-api/src/main/java/ai/vespa/hosted/api/Properties.java
+++ b/hosted-api/src/main/java/ai/vespa/hosted/api/Properties.java
@@ -30,18 +30,26 @@ public class Properties {
return getNonBlankProperty("region").map(RegionName::from);
}
- public static URI endpoint() {
+ public static URI apiEndpoint() {
return URI.create(requireNonBlankProperty("endpoint"));
}
- public static Path privateKeyFile() {
+ public static Path apiPrivateKeyFile() {
return Paths.get(requireNonBlankProperty("privateKeyFile"));
}
- public static Optional<Path> certificateFile() {
+ public static Optional<Path> apiCertificateFile() {
return getNonBlankProperty("certificateFile").map(Paths::get);
}
+ public static Optional<Path> dataPlaneCertificateFile() {
+ return getNonBlankProperty("dataPlaneCertificateFile").map(Paths::get);
+ }
+
+ public static Optional<Path> dataPlanePrivateKeyFile() {
+ return getNonBlankProperty("dataPlaneKeyFile").map(Paths::get);
+ }
+
/** Returns the system property with the given name if it is set, or empty. */
public static Optional<String> getNonBlankProperty(String name) {
return Optional.ofNullable(System.getProperty(name)).filter(value -> ! value.isBlank());