aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ncomp-docker-adaptor/src/main/java/org/openecomp/ncomp/servers/docker/DockerDockerHostProvider.java6
1 files 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);
}
}