Skip to content
Snippets Groups Projects
Commit f7bc6161 authored by Chandrasekhar Ramakrishnan's avatar Chandrasekhar Ramakrishnan
Browse files

SSDM-4670: Use the hostname in defining the url for the repo.

parent 48dedc0e
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,7 @@ from contextlib import contextmanager ...@@ -17,6 +17,7 @@ from contextlib import contextmanager
from . import config as dm_config from . import config as dm_config
import traceback import traceback
import getpass import getpass
import socket
import pybis import pybis
...@@ -436,8 +437,9 @@ class OpenbisSync(object): ...@@ -436,8 +437,9 @@ class OpenbisSync(object):
if external_dms_id is None: if external_dms_id is None:
external_dms_id = "{}-{}".format(user, path_name).upper() external_dms_id = "{}-{}".format(user, path_name).upper()
try: try:
hostname = socket.gethostname()
edms = self.openbis.create_external_data_management_system(external_dms_id, external_dms_id, edms = self.openbis.create_external_data_management_system(external_dms_id, external_dms_id,
"localhost:/{}".format(top_level_path)) "{}:/{}".format(hostname, top_level_path))
return CommandResult(returncode=0, output=""), edms return CommandResult(returncode=0, output=""), edms
except ValueError as e: except ValueError as e:
# The EDMS might already be in the system. Try to get it. # The EDMS might already be in the system. Try to get it.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment