From aacf6f0598564b2dcc8ebc756dd753282174a2d1 Mon Sep 17 00:00:00 2001 From: Jacob Boddey Date: Fri, 9 Aug 2024 11:48:21 +0100 Subject: [PATCH] Add org name to config --- framework/python/src/common/session.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/framework/python/src/common/session.py b/framework/python/src/common/session.py index 02d46591e..b84628027 100644 --- a/framework/python/src/common/session.py +++ b/framework/python/src/common/session.py @@ -35,6 +35,7 @@ API_URL_KEY = 'api_url' API_PORT_KEY = 'api_port' MAX_DEVICE_REPORTS_KEY = 'max_device_reports' +ORG_NAME_KEY = 'org_name' CERTS_PATH = 'local/root_certs' CONFIG_FILE_PATH = 'local/system.json' @@ -143,7 +144,8 @@ def _get_default_config(self): 'monitor_period': 30, 'max_device_reports': 0, 'api_url': 'http://localhost', - 'api_port': 8000 + 'api_port': 8000, + 'org_name': '' } def get_config(self): @@ -190,6 +192,11 @@ def _load_config(self): self._config[MAX_DEVICE_REPORTS_KEY] = config_file_json.get( MAX_DEVICE_REPORTS_KEY) + if ORG_NAME_KEY in config_file_json: + self._config[ORG_NAME_KEY] = config_file_json.get( + ORG_NAME_KEY + ) + LOGGER.debug(self._config) def _load_version(self):