From d69696b30892ae9f4f7ee289921ab4b9225884ab Mon Sep 17 00:00:00 2001 From: Carsten Lund Date: Fri, 9 Jun 2017 16:31:53 +0000 Subject: [DCAE-15] Final update for rebased code. Change-Id: I2a70ed74b9051db112474c3939bc4717ec845872 Signed-off-by: Carsten Lund --- .../openecomp/ncomp/servers/docker/DockerDockerHostProvider.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ncomp-docker-adaptor/src/main/java/org/openecomp/ncomp/servers/docker/DockerDockerHostProvider.java b/ncomp-docker-adaptor/src/main/java/org/openecomp/ncomp/servers/docker/DockerDockerHostProvider.java index 8c83df5..8747fdf 100644 --- a/ncomp-docker-adaptor/src/main/java/org/openecomp/ncomp/servers/docker/DockerDockerHostProvider.java +++ b/ncomp-docker-adaptor/src/main/java/org/openecomp/ncomp/servers/docker/DockerDockerHostProvider.java @@ -39,7 +39,7 @@ import java.io.UnsupportedEncodingException; import org.openecomp.ncomp.sirius.manager.ISiriusServer; import org.openecomp.ncomp.sirius.manager.ManagementServer; import org.openecomp.ncomp.sirius.manager.ManagementServerUtils; - +import org.openecomp.ncomp.utils.SecurityUtils; import org.apache.log4j.Logger; import org.json.JSONArray; import org.json.JSONObject; @@ -351,8 +351,8 @@ class DockerDockerHostProvider extends BasicAdaptorProvider { if (opts.isSetContainerName()) { try { - jobj.put("Hostname", InetAddress.getLocalHost().getHostName()); - } catch(UnknownHostException e) { + jobj.put("Hostname", SecurityUtils.getHostName()); + } catch(Exception e) { logger.error("Unable to determine local hostname", e); } } -- cgit 1.2.3-korg