Commit b9d3661b authored by Spencer Sutton's avatar Spencer Sutton
Browse files

Fixing config

parent 253dfd3f
......@@ -46,7 +46,6 @@ class BaseClient:
"""
config_manager = config_manager or DefaultConfigManager()
self.data_partition_id = config_manager.get('environment', 'data_partition_id')
self.provider = config_manager.get('provider', 'name')
self.data_workflow_url = config_manager.get('environment', 'data_workflow_url')
......
......@@ -68,7 +68,7 @@ class DefaultConfigManager(BaseConfigManager):
:rtype: configparser.ConfigParser
"""
config_file_path = config_file_path or os.environ.get("OSDU_API_CONFIG_INI") or "osdu_api.ini"
parser = configparser.ConfigParser()
parser = configparser.ConfigParser(os.environ)
config_read_results = parser.read(config_file_path)
if not config_read_results:
raise configparser.Error(f"Could not find the config file in '{config_file_path}'.")
......
......@@ -14,8 +14,11 @@
from osdu_api.clients.legal.legal_client import LegalClient
from osdu_api.model.legal.legal_tag import LegalTag
from osdu_api.model.legal.legal_tag_properties import LegalTagProperties
from osdu_api.configuration.config_manager import DefaultConfigManager
import os
legal_client = LegalClient("opendes")
os.environ['BASE_URL'] = 'https://suttonsp.dev.osdu.aws'
legal_client = LegalClient(DefaultConfigManager(), "opendes")
legal_tag_properties = LegalTagProperties(['US'], 'A1234', 2222222222222, 'default', 'Public Domain Data', 'Public', 'No Personal Data', 'EAR99')
......
......@@ -15,7 +15,7 @@
storage_url=%(BASE_URL)s/api/storage/v2
search_url=%(BASE_URL)s/api/search/v2
legal_url=%(BASE_URL)s/api/legal/v1
data_workflow_url=%(BASE_URL)s/api/data-workflow/v1
data_workflow_url=deprecated
file_dms_url=%(BASE_URL)s/api/filedms/v2
dataset_url=%(BASE_URL)s/api/dataset/v1
entitlements_url=%(BASE_URL)s/api/entitlements/v1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment