aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/presentation/pal.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2018-09-12 09:01:54 +0200
committerTibor Frank <tifrank@cisco.com>2018-09-17 13:20:41 +0000
commit9b3acaab57323a01e3ccd0cc1fd7467350ffed75 (patch)
tree7355a801e32496192b3142cb2a3e9f7b0ee9db97 /resources/tools/presentation/pal.py
parent0c0217c3219f2a7e9273c830663a7d3374e4b5c5 (diff)
CSIT-1131: Alerting
- CSIT-1132: Send e-mail with a list of failed tests - CSIT-1288: Prepare data to be sent by Jenkins Change-Id: I7ac720dca44d7c13b22218abbca7a00d36d459cb Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/tools/presentation/pal.py')
-rw-r--r--resources/tools/presentation/pal.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/resources/tools/presentation/pal.py b/resources/tools/presentation/pal.py
index a6b4d58bcf..72493cb0d3 100644
--- a/resources/tools/presentation/pal.py
+++ b/resources/tools/presentation/pal.py
@@ -28,6 +28,7 @@ from generator_files import generate_files
from static_content import prepare_static_content
from generator_report import generate_report
from generator_CPTA import generate_cpta
+from generator_alerts import Alerting, AlertingError
def parse_args():
@@ -111,14 +112,22 @@ def main():
logging.info("Successfully finished.")
elif spec.output["output"] == "CPTA":
sys.stdout.write(generate_cpta(spec, data))
+ alert = Alerting(spec)
+ alert.generate_alerts()
logging.info("Successfully finished.")
ret_code = 0
- except (KeyError, ValueError, PresentationError) as err:
- logging.info("Finished with an error.")
+ except AlertingError as err:
+ logging.critical("Finished with an alerting error.")
+ logging.critical(repr(err))
+ except PresentationError as err:
+ logging.critical("Finished with an PAL error.")
+ logging.critical(repr(err))
+ except (KeyError, ValueError) as err:
+ logging.critical("Finished with an error.")
logging.critical(repr(err))
except Exception as err:
- logging.info("Finished with an unexpected error.")
+ logging.critical("Finished with an unexpected error.")
logging.critical(repr(err))
finally:
if spec is not None: