From 2d2e0b503f915a81ae9a02dfa3afac3de369efde Mon Sep 17 00:00:00 2001 From: sheetalm Date: Thu, 8 Feb 2018 09:30:02 +0530 Subject: Onboarding foundation changes 1. Adding OnboardingSessionContextFilter which sets tenant(kespace) for onboarding application 2. Different services can extend SessionContextFilter to set their own keyspace 3. These changes in onboarding are done to support services like ActivitySpec Change-Id: Ia62557354ab05235d027250af94a2835d741b7fa Issue-ID: SDC-1005 Signed-off-by: sheetalm --- .../sdcrests/health/rest/services/HealthCheckImpl.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src') diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src/main/java/org/openecomp/sdcrests/health/rest/services/HealthCheckImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src/main/java/org/openecomp/sdcrests/health/rest/services/HealthCheckImpl.java index b50913aa6f..bb2d9ea565 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src/main/java/org/openecomp/sdcrests/health/rest/services/HealthCheckImpl.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-services/src/main/java/org/openecomp/sdcrests/health/rest/services/HealthCheckImpl.java @@ -21,6 +21,7 @@ package org.openecomp.sdcrests.health.rest.services; import org.apache.cxf.jaxrs.impl.ResponseBuilderImpl; +import org.openecomp.sdc.common.session.SessionContext; import org.openecomp.sdc.common.session.SessionContextProviderFactory; import org.openecomp.sdc.health.HealthCheckManager; import org.openecomp.sdc.health.HealthCheckManagerFactory; @@ -32,10 +33,10 @@ import org.openecomp.sdc.logging.api.LoggerFactory; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Service; -import javax.inject.Named; -import javax.ws.rs.core.Response; import java.util.Arrays; import java.util.Collection; +import javax.inject.Named; +import javax.ws.rs.core.Response; @Named @Service("healthCheck") @@ -56,7 +57,12 @@ public class HealthCheckImpl implements org.openecomp.sdcrests.health.rest.Healt @Override public Response checkHealth() { HealthCheckResult healthCheckResult = new HealthCheckResult(); - SessionContextProviderFactory.getInstance().createInterface().create("public"); + + SessionContext context = + SessionContextProviderFactory.getInstance().createInterface().get(); + + SessionContextProviderFactory.getInstance().createInterface().create("public", + context.getTenant()); try { Collection healthInfos = healthCheckManager.checkHealth(); -- cgit 1.2.3-korg