summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
d9f395e)
Issue-ID: POLICY-1689 Consolidate Policy Health Check into PAP
Change-Id: Ie7f8edf1d1a083c6c696824f249544959f72694d
Signed-off-by: Hengye <yehui.wang@est.tech>
/*-
* ============LICENSE_START=======================================================
/*-
* ============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.
* 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.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import org.onap.policy.api.main.startstop.ApiActivator;
import org.onap.policy.common.endpoints.report.HealthCheckReport;
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.
/**
* Class to fetch health check of api service.
private static final String NOT_ALIVE = "not alive";
private static final String ALIVE = "alive";
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";
/**
private static final String NAME = "Policy API";
/**
private static final Logger LOGGER = LoggerFactory.getLogger(TestApiRestServer.class);
private static final String NOT_ALIVE = "not alive";
private static final String ALIVE = "alive";
private static final Logger LOGGER = LoggerFactory.getLogger(TestApiRestServer.class);
private static final String NOT_ALIVE = "not alive";
private static final String ALIVE = "alive";
- private static final String SELF = "self";
+ private static final String SELF = NetworkUtil.getHostname();
private static final String NAME = "Policy API";
private static final String APP_JSON = "application/json";
private static final String APP_YAML = "application/yaml";
private static final String NAME = "Policy API";
private static final String APP_JSON = "application/json";
private static final String APP_YAML = "application/yaml";