diff options
author | Bjørn Christian Seime <bjorncs@oath.com> | 2018-01-09 15:38:22 +0100 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@oath.com> | 2018-01-09 15:38:22 +0100 |
commit | bafe8545e805a93439d7b313a6bde72ebece18ab (patch) | |
tree | 34a5b0ec6e38c0ef18acd93995d658cb915ba715 | |
parent | e8b197ceb9652cb85f3473675725e3c3d894c98f (diff) |
Provide secure configserver uris from application v4 api
3 files changed, 6 insertions, 11 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/zone/ZoneRegistry.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/zone/ZoneRegistry.java index e95c297b593..2945544d668 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/zone/ZoneRegistry.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/zone/ZoneRegistry.java @@ -33,7 +33,9 @@ public interface ZoneRegistry { * @deprecated Use {@link #getConfigServerSecureUris(ZoneId)} instead (requires that client trusts Athenz CA) */ @Deprecated - List<URI> getConfigServerUris(ZoneId zoneId); + default List<URI> getConfigServerUris(ZoneId zoneId) { + throw new UnsupportedOperationException("Use getConfigServerSecureUris() instead"); + } /** Returns a list with all known config servers in the given zone, with a secure connection URL. */ List<URI> getConfigServerSecureUris(ZoneId zoneId); diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/Controller.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/Controller.java index 1f386b662aa..24b85ce55af 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/Controller.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/Controller.java @@ -160,14 +160,7 @@ public class Controller extends AbstractComponent { return zoneRegistry.getLogServerUri(deploymentId); } - /** - * @deprecated Use {@link #getSecureConfigServerUris(ZoneId)} instead - */ - @Deprecated - public List<URI> getConfigServerUris(ZoneId zoneId) { - return zoneRegistry.getConfigServerUris(zoneId); - } - + // TODO Rename to getConfigServerUris once port 4080 is removed from configservers public List<URI> getSecureConfigServerUris(ZoneId zoneId) { return zoneRegistry.getConfigServerSecureUris(zoneId); } diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java index 21230cb8e0d..9c61a010082 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/application/ApplicationApiHandler.java @@ -579,7 +579,7 @@ public class ApplicationApiHandler extends LoggingRequestHandler { ApplicationView applicationView = controller.getApplicationView(tenantName, applicationName, instanceName, environment, region); ServiceApiResponse response = new ServiceApiResponse(ZoneId.from(environment, region), new ApplicationId.Builder().tenant(tenantName).applicationName(applicationName).instanceName(instanceName).build(), - controller.getConfigServerUris(ZoneId.from(environment, region)), + controller.getSecureConfigServerUris(ZoneId.from(environment, region)), request.getUri()); response.setResponse(applicationView); return response; @@ -589,7 +589,7 @@ public class ApplicationApiHandler extends LoggingRequestHandler { Map<?,?> result = controller.getServiceApiResponse(tenantName, applicationName, instanceName, environment, region, serviceName, restPath); ServiceApiResponse response = new ServiceApiResponse(ZoneId.from(environment, region), new ApplicationId.Builder().tenant(tenantName).applicationName(applicationName).instanceName(instanceName).build(), - controller.getConfigServerUris(ZoneId.from(environment, region)), + controller.getSecureConfigServerUris(ZoneId.from(environment, region)), request.getUri()); response.setResponse(result, serviceName, restPath); return response; |