summaryrefslogtreecommitdiffstats
path: root/configserver
diff options
context:
space:
mode:
authorValerij Fredriksen <valerijf@verizonmedia.com>2021-07-06 21:51:05 +0200
committerValerij Fredriksen <valerijf@verizonmedia.com>2021-07-06 21:51:05 +0200
commit33894424802f5039e7c17d1c4f3c0498f3356ccf (patch)
treef77ab3377bf3f36a9dd3c2d4b6ab8181ceff4796 /configserver
parent75f405e81ed0b045e379653840eed45a655aafd2 (diff)
Remove old clustercontroller status page endpoint
Diffstat (limited to 'configserver')
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandler.java2
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandlerTest.java24
2 files changed, 0 insertions, 26 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandler.java b/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandler.java
index 7691748a4cf..ec7b6616bb6 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandler.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandler.java
@@ -5,7 +5,6 @@ import com.google.inject.Inject;
import com.yahoo.component.Version;
import com.yahoo.config.application.api.ApplicationFile;
import com.yahoo.config.model.api.Model;
-import com.yahoo.config.model.api.container.ContainerServiceType;
import com.yahoo.config.provision.ApplicationId;
import com.yahoo.config.provision.HostFilter;
import com.yahoo.config.provision.InstanceName;
@@ -69,7 +68,6 @@ public class ApplicationHandler extends HttpHandler {
if (path.matches("/application/v2/tenant/{tenant}/application/{application}")) return getApplicationResponse(ApplicationId.from(path.get("tenant"), path.get("application"), InstanceName.defaultName().value()));
if (path.matches("/application/v2/tenant/{tenant}/application/{application}/environment/{ignore}/region/{ignore}/instance/{instance}")) return getApplicationResponse(applicationId(path));
- if (path.matches("/application/v2/tenant/{tenant}/application/{application}/environment/{ignore}/region/{ignore}/instance/{instance}/clustercontroller/{hostname}/status/v1/{*}")) return serviceStatusPage(applicationId(path), ContainerServiceType.CLUSTERCONTROLLER_CONTAINER.serviceName, path.get("hostname"), path.getRest()); // TODO (freva): Remove August 2021
if (path.matches("/application/v2/tenant/{tenant}/application/{application}/environment/{ignore}/region/{ignore}/instance/{instance}/content/{*}")) return content(applicationId(path), path.getRest(), request);
if (path.matches("/application/v2/tenant/{tenant}/application/{application}/environment/{ignore}/region/{ignore}/instance/{instance}/filedistributionstatus")) return filedistributionStatus(applicationId(path), request);
if (path.matches("/application/v2/tenant/{tenant}/application/{application}/environment/{ignore}/region/{ignore}/instance/{instance}/logs")) return logs(applicationId(path), request);
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandlerTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandlerTest.java
index acc39223396..46d94ec476b 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandlerTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/ApplicationHandlerTest.java
@@ -60,7 +60,6 @@ import java.util.TreeMap;
import java.util.TreeSet;
import java.util.stream.Stream;
-import static com.yahoo.config.model.api.container.ContainerServiceType.CLUSTERCONTROLLER_CONTAINER;
import static com.yahoo.container.jdisc.HttpRequest.createTestRequest;
import static com.yahoo.jdisc.http.HttpRequest.Method.DELETE;
import static com.yahoo.jdisc.http.HttpRequest.Method.GET;
@@ -72,10 +71,8 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
/**
* @author hmusum
@@ -344,27 +341,6 @@ public class ApplicationHandlerTest {
}
@Test
- public void testClusterControllerStatus() throws Exception {
- applicationRepository.deploy(testApp, prepareParams(applicationId));
- String host = "foo.yahoo.com";
- String url = toUrlPath(applicationId, Zone.defaultZone(), true) + "/clustercontroller/" + host + "/status/v1/clusterName1";
- HttpProxy mockHttpProxy = mock(HttpProxy.class);
- ApplicationRepository applicationRepository = new ApplicationRepository.Builder()
- .withTenantRepository(tenantRepository)
- .withHostProvisionerProvider(HostProvisionerProvider.empty())
- .withOrchestrator(orchestrator)
- .withTesterClient(testerClient)
- .withHttpProxy(mockHttpProxy)
- .build();
- ApplicationHandler mockHandler = createApplicationHandler(applicationRepository);
- when(mockHttpProxy.get(any(), eq(host), eq(CLUSTERCONTROLLER_CONTAINER.serviceName), eq("clustercontroller-status/v1/clusterName1")))
- .thenReturn(new StaticResponse(200, "text/html", "<html>...</html>"));
-
- HttpResponse response = mockHandler.handle(createTestRequest(url, GET));
- assertHttpStatusCodeAndMessage(response, 200, "text/html", "<html>...</html>");
- }
-
- @Test
public void testServiceStatus() throws Exception {
applicationRepository.deploy(testApp, prepareParams(applicationId));
String host = "foo.yahoo.com";