From 425040c807f03eaae14b3c02708533f4f546d9c6 Mon Sep 17 00:00:00 2001 From: ChrisC Date: Tue, 16 Mar 2021 14:12:46 +0100 Subject: Remove unused dcae-be healthcheck Remove DCAE-DS backend Healthchecks that are noisy in the logs DCAE-DS was sunset in G release Issue-ID: SDC-3514 Signed-off-by: ChrisC Change-Id: Iad9d6738ec813be9b87766ed189deda34e711ab1 --- .../cookbooks/sdc-catalog-be/attributes/default.rb | 5 ----- .../recipes/BE_2_setup_configuration.rb | 1 - .../templates/default/BE-configuration.yaml.erb | 11 ----------- .../health/HealthCheckBusinessLogic.java | 20 +------------------- .../health/HealthCheckBusinessLogicHealthTest.java | 22 +--------------------- .../resources/config/catalog-be/configuration.yaml | 6 ------ 6 files changed, 2 insertions(+), 63 deletions(-) (limited to 'catalog-be') diff --git a/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb b/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb index 614433c2e7..528ddae9ad 100644 --- a/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb +++ b/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/attributes/default.rb @@ -19,11 +19,6 @@ default['jetty'][:keymanager_pwd] = "?(kP!Yur![*!Y5!E^f(ZKc31" # MUST BE ALSO CHANGE IN THE startup.sh FILE default['jetty'][:truststore_pwd] = "z+KEj;t+,KN^iimSiS89e#p0" -#Reserved for DCAE backend -default['DCAE']['BE'][:http_port] = 8082 -default['DCAE']['BE'][:https_port] = 8444 -default['DCAE_BE_VIP'] = "dcae-be" - #BasicAuth default['basic_auth']['enabled'] = false default['basic_auth'][:user_name] = "testName" diff --git a/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb b/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb index cdb9f82729..51a943fa68 100644 --- a/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb +++ b/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/recipes/BE_2_setup_configuration.rb @@ -61,7 +61,6 @@ template "catalog-be-config" do :cassandra_usr => node['cassandra'][:cassandra_user], :cassandra_truststore_password => node['cassandra'][:truststore_password], :cassandra_ssl_enabled => "#{ENV['cassandra_ssl_enabled']}", - :dcae_be_vip => node['DCAE_BE_VIP'], :dmaap_active => node['DMAAP']['active'] }) end diff --git a/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb b/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb index e8d2ece84b..5a059aae7d 100644 --- a/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb +++ b/catalog-be/src/main/docker/backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb @@ -948,17 +948,6 @@ onboarding: downloadCsarUri: "/onboarding-api/v1.0/vendor-software-products/packages" healthCheckUri: "/onboarding-api/v1.0/healthcheck" -dcae: - host: <%= @dcae_be_vip %> - <% if node[:disableHttp] -%> - protocol: https - port: <%= node['DCAE']['BE'][:https_port] %> - <% else %> - protocol: http - port: <%= node['DCAE']['BE'][:http_port] %> - <% end -%> - healthCheckUri: "/dcae/healthCheck" - # #GSS IDNS switchoverDetector: gBeFqdn: diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/health/HealthCheckBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/health/HealthCheckBusinessLogic.java index e5eefb43ad..c532ee979e 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/health/HealthCheckBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/health/HealthCheckBusinessLogic.java @@ -66,7 +66,6 @@ import static org.apache.http.HttpStatus.SC_INTERNAL_SERVER_ERROR; import static org.apache.http.HttpStatus.SC_OK; import static org.openecomp.sdc.common.api.Constants.HC_COMPONENT_BE; import static org.openecomp.sdc.common.api.Constants.HC_COMPONENT_CASSANDRA; -import static org.openecomp.sdc.common.api.Constants.HC_COMPONENT_DCAE; import static org.openecomp.sdc.common.api.Constants.HC_COMPONENT_DMAAP_PRODUCER; import static org.openecomp.sdc.common.api.Constants.HC_COMPONENT_ECOMP_PORTAL; import static org.openecomp.sdc.common.api.Constants.HC_COMPONENT_JANUSGRAPH; @@ -163,10 +162,7 @@ public class HealthCheckBusinessLogic { // Amdocs healthCheckInfos.add(getHostedComponentsBeHealthCheck(HC_COMPONENT_ON_BOARDING, buildOnBoardingHealthCheckUrl())); - //DCAE - healthCheckInfos.add(getHostedComponentsBeHealthCheck(HC_COMPONENT_DCAE, buildDcaeHealthCheckUrl())); - - //ECOMP Portal + //ECOMP Portal healthCheckInfos.add(portalHealthCheck.getHealthCheckInfo()); //CADI @@ -440,20 +436,6 @@ public class HealthCheckBusinessLogic { return null; } - @VisibleForTesting - String buildDcaeHealthCheckUrl() { - - Configuration.DcaeConfig dcaeConfig = ConfigurationManager.getConfigurationManager().getConfiguration().getDcae(); - - if (dcaeConfig != null) { - return String.format(hcUrl, dcaeConfig.getProtocol(), dcaeConfig.getHost(), - dcaeConfig.getPort(),dcaeConfig.getHealthCheckUri()); - } - - log.error("DCAE health check configuration is missing."); - return null; - } - public class HealthCheckScheduledTask implements Runnable { @Override public void run() { diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/health/HealthCheckBusinessLogicHealthTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/health/HealthCheckBusinessLogicHealthTest.java index d7e0654806..7f4b82bcaf 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/health/HealthCheckBusinessLogicHealthTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/health/HealthCheckBusinessLogicHealthTest.java @@ -45,7 +45,6 @@ import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.when; -import static org.openecomp.sdc.common.api.Constants.HC_COMPONENT_DCAE; import static org.openecomp.sdc.common.api.Constants.HC_COMPONENT_ON_BOARDING; @RunWith(MockitoJUnitRunner.class) @@ -218,17 +217,6 @@ public class HealthCheckBusinessLogicHealthTest extends BeConfDependentTest { Assert.assertEquals("PORTAL is not available", hci.getDescription()); } - @Test - public void testGetDcaeHealthCheck() throws Exception { - HealthCheckBusinessLogic testSubject; - List healthCheckInfos = new LinkedList<>(); - - // default test - testSubject = createTestSubject(); - String url = testSubject.buildDcaeHealthCheckUrl(); - Deencapsulation.invoke(testSubject, "getHostedComponentsBeHealthCheck", HC_COMPONENT_DCAE, url); - } - @Test public void testGetHostedComponentsBeHealthCheck() throws Exception { HealthCheckBusinessLogic testSubject; @@ -317,12 +305,4 @@ public class HealthCheckBusinessLogicHealthTest extends BeConfDependentTest { Deencapsulation.invoke(testSubject, "buildOnBoardingHealthCheckUrl"); } - @Test - public void testBuildDcaeHealthCheckUrl() throws Exception { - HealthCheckBusinessLogic testSubject; - - // default test - testSubject = createTestSubject(); - Deencapsulation.invoke(testSubject, "buildDcaeHealthCheckUrl"); - } -} \ No newline at end of file +} diff --git a/catalog-be/src/test/resources/config/catalog-be/configuration.yaml b/catalog-be/src/test/resources/config/catalog-be/configuration.yaml index 3ca0682a4b..78d3722806 100644 --- a/catalog-be/src/test/resources/config/catalog-be/configuration.yaml +++ b/catalog-be/src/test/resources/config/catalog-be/configuration.yaml @@ -349,12 +349,6 @@ onboarding: downloadCsarUri: "/onboarding-api/v1.0/vendor-software-products/packages" healthCheckUri: "/onboarding-api/v1.0/healthcheck" -dcae: - protocol: http - host: 127.0.0.1 - port: 8080 - healthCheckUri: "/dcae/healthCheck" - ecompPortal: protocol: https host: ecomp-portal-web-tdevn2.mtn23a.ecomp.cci.att.com -- cgit 1.2.3-korg