We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23dac75 commit 7f28303Copy full SHA for 7f28303
OMPython/OMCSession.py
@@ -36,6 +36,7 @@
36
37
import getpass
38
import io
39
+import json
40
import logging
41
import os
42
import pathlib
@@ -641,6 +642,13 @@ def _getuid() -> int:
641
642
"""
643
return 1000 if sys.platform == 'win32' else os.getuid()
644
645
+ def get_server_address(self) -> Optional[str]:
646
+ if self._dockerNetwork == "separate" and isinstance(self._dockerCid, str):
647
+ output = subprocess.check_output(["docker", "inspect", self._dockerCid]).decode().strip()
648
+ return json.loads(output)[0]["NetworkSettings"]["IPAddress"]
649
+
650
+ return None
651
652
653
class OMCProcessDocker(OMCProcess, OMCProcessDockerHelper):
654
0 commit comments