diff options
author | SrikanthNaidu <sn8492@att.com> | 2018-12-19 19:06:39 +0530 |
---|---|---|
committer | SrikanthNaidu <sn8492@att.com> | 2018-12-19 19:06:39 +0530 |
commit | e011cf052edad0e70ce2846d483fa29f6283bef3 (patch) | |
tree | ed8ac40b06cbf4e94f13f15c31602b2378f36abb /miss_htbt_service/mod/trapd_get_cbs_config.py | |
parent | 20110ffeb5071193e7b437e797636d9d6318dcd4 (diff) |
heartbeat service Logging complaincepgcode-optimization
All components deployed should conform to ONAP logging guidelines
Issue-ID: DCAEGEN2-628
Change-Id: I2febe2456033f3aa2961fcb2f656b64b1515cd03
Signed-off-by: SrikanthNaidu <sn8492@att.com>
Diffstat (limited to 'miss_htbt_service/mod/trapd_get_cbs_config.py')
-rw-r--r-- | miss_htbt_service/mod/trapd_get_cbs_config.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/miss_htbt_service/mod/trapd_get_cbs_config.py b/miss_htbt_service/mod/trapd_get_cbs_config.py index d2b615f..47ba223 100644 --- a/miss_htbt_service/mod/trapd_get_cbs_config.py +++ b/miss_htbt_service/mod/trapd_get_cbs_config.py @@ -58,9 +58,9 @@ def get_cbs_config(): # See if we are in a config binding service (CBS) /controller environment try: + msg = "Unable to fetch CBS config or it is erroneously empty - trying override/simulator config" tds.c_config = get_config() if tds.c_config == {}: - msg = "Unable to fetch CBS config or it is erroneously empty - trying override/simulator config" stdout_logger(msg) # if no CBS present, default to JSON config specified via CBS_HTBT_JSON env var @@ -69,15 +69,15 @@ def get_cbs_config(): stdout_logger(msg) try: + msg = "CBS_HTBT_JSON not defined - FATAL ERROR, exiting" _cbs_sim_json_file = os.getenv("CBS_HTBT_JSON", "None") except Exception as e: - msg = "CBS_HTBT_JSON not defined - FATAL ERROR, exiting" stdout_logger(msg) cleanup(1,None) return False + msg = "CBS_HTBT_JSON not defined - FATAL ERROR, exiting" if _cbs_sim_json_file == "None": - msg = "CBS_HTBT_JSON not defined - FATAL ERROR, exiting" stdout_logger(msg) cleanup(1,None) return False @@ -85,11 +85,11 @@ def get_cbs_config(): msg = ("ONAP controller override specified via CBS_HTBT_JSON: %s" % _cbs_sim_json_file) stdout_logger(msg) + msg = "Unable to load CBS_HTBT_JSON " + _cbs_sim_json_file + \ + " (invalid json?) - FATAL ERROR, exiting" try: tds.c_config = json.load(open(_cbs_sim_json_file)) except Exception as e: - msg = "Unable to load CBS_HTBT_JSON " + _cbs_sim_json_file + \ - " (invalid json?) - FATAL ERROR, exiting" stdout_logger(msg) cleanup_and_exit(0,None) |