X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=main%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fapi%2Fmain%2Frest%2Fprovider%2FHealthCheckProvider.java;h=a8edaa12d69e76964944cc9942123b36130f6d02;hb=22fce245d748d59a980c9744ab8a133b9a4fa758;hp=e59aee8b5b838c1228e2d65cf6114dd93ab2fbbc;hpb=d9f395e503ed6cd01e7af3b0ee8cc0f360865c88;p=policy%2Fapi.git diff --git a/main/src/main/java/org/onap/policy/api/main/rest/provider/HealthCheckProvider.java b/main/src/main/java/org/onap/policy/api/main/rest/provider/HealthCheckProvider.java index e59aee8b..a8edaa12 100644 --- a/main/src/main/java/org/onap/policy/api/main/rest/provider/HealthCheckProvider.java +++ b/main/src/main/java/org/onap/policy/api/main/rest/provider/HealthCheckProvider.java @@ -1,9 +1,10 @@ /*- * ============LICENSE_START======================================================= - * ONAP Policy API - * ================================================================================ + * ONAP Policy API + * ================================================================================ * Copyright (C) 2018 Samsung Electronics Co., Ltd. All rights reserved. * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2019 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +26,7 @@ package org.onap.policy.api.main.rest.provider; import org.onap.policy.api.main.startstop.ApiActivator; import org.onap.policy.common.endpoints.report.HealthCheckReport; +import org.onap.policy.common.utils.network.NetworkUtil; /** * Class to fetch health check of api service. @@ -34,7 +36,7 @@ public class HealthCheckProvider { private static final String NOT_ALIVE = "not alive"; private static final String ALIVE = "alive"; - private static final String URL = "self"; + private static final String URL = NetworkUtil.getHostname(); private static final String NAME = "Policy API"; /**