Clean-up existing docker-compose solutions
[oam.git] / solution / smo / common / identity / config.py
similarity index 98%
rename from solution/integration/smo/common/identity/config.py
rename to solution/smo/common/identity/config.py
index 1ff53ac..9db5de1 100644 (file)
@@ -17,6 +17,7 @@
 
 # importing the sys, json, requests library
 import os
+import pathlib
 import sys
 import json
 import time
@@ -31,7 +32,8 @@ warnings.filterwarnings('ignore', message='Unverified HTTPS request')
 
 def get_environment_variable(name):
     configs = Properties()
-    env_file = os.path.dirname(os.path.abspath(__file__)) + '/' + '../' + '.env'
+    path = pathlib.Path( os.path.dirname(os.path.abspath(__file__)) )
+    env_file = str(path.parent.absolute()) + '/.env'
     with open(env_file, "rb") as read_prop:
         configs.load(read_prop)
     return configs.get(name).data
@@ -60,7 +62,7 @@ def load_arguments(args: List[str]) -> tuple:
 
 
 def isReady(timeoutSeconds=180):
-    url = getBaseUrl()
+    url = getBaseUrl();
     while timeoutSeconds > 0:
         try:
             response = requests.get(url, verify=False, headers={})