diff options
author | 2017-07-26 11:49:07 -0400 | |
---|---|---|
committer | 2017-07-26 13:47:31 -0400 | |
commit | a9627f8c54b7e9d5712320621e8a0b748ad9baf4 (patch) | |
tree | 5d43d73ff9b0e47f74aed77be03bbf761e3b621b /ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ConsulHealthServiceImpl.java | |
parent | 134cb7f97684487cf8a0245617c339a3fe2d54b0 (diff) |
Repair Portal defects; upgrade Docker build.
PORTAL-39 Remove MojoHaus Maven plug-in from pom file
PORTAL-38 VID tab is not showing portal for VID
PORTAL-37 Portal cannot resolve UEB host vm1-message-router;
use ueb.api.simpledemo.openecomp.org instead
PORTAL-36 Show Portal app version number in footer;
unpack war file instead of copying directory
PORTAL-35 update ECOMP Portal to ONAP logo on login page
PORTAL-34 Portal partners (Policy, VID) got 404 on landing page;
recognize process_csp as valid endpoint in Portal
PORTAL-30 Failed to communicate with the widget microservice;
add configuration properties with widget-ms host name and protocol.
Issue: PORTAL-30, PORTAL-34, PORTAL-35, PORTAL-36, PORTAL-37, PORTAL-38, PORTAL-39
Change-Id: I1e53e4985266f736ddad4ed49b287a23178ea3c3
Signed-off-by: Christopher Lott (cl778h) <clott@research.att.com>
Diffstat (limited to 'ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ConsulHealthServiceImpl.java')
-rw-r--r-- | ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ConsulHealthServiceImpl.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ConsulHealthServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ConsulHealthServiceImpl.java index 175a1c71..0cfa4f81 100644 --- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ConsulHealthServiceImpl.java +++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ConsulHealthServiceImpl.java @@ -21,6 +21,7 @@ package org.openecomp.portalapp.portal.service; import java.util.List; +import org.openecomp.portalapp.portal.utils.EcompPortalUtils; import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.stereotype.Component; @@ -44,7 +45,7 @@ public class ConsulHealthServiceImpl implements ConsulHealthService { HealthClient healthClient = consul.healthClient(); nodes = healthClient.getHealthyServiceInstances(service).getResponse(); } catch (Exception e) { - String localFallbackServiceLocation = "localhost:" + fallbackPortOnLocalHost; + String localFallbackServiceLocation = EcompPortalUtils.localOrDockerHost() + ":" + fallbackPortOnLocalHost; logger.debug(EELFLoggerDelegate.debugLogger, " problem getting nodes for service {1}. Defaulting to {2}. Exception: {3}", service, localFallbackServiceLocation, e.getMessage()); @@ -57,7 +58,7 @@ public class ConsulHealthServiceImpl implements ConsulHealthService { if (nodes == null || nodes.size() == 0) { logger.debug(EELFLoggerDelegate.debugLogger, "No healthy node found in the consul cluster running service " + service + ". Defaulting to localhost"); - return "localhost:" + fallbackPortOnLocalHost; + return EcompPortalUtils.localOrDockerHost() + ":" + fallbackPortOnLocalHost; } else { String locationFromConsul; ServiceHealth node = nodes.get(0); |