-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54994/
-----------------------------------------------------------

Review request for Ambari, Di Li and Tim Thorpe.


Bugs: AMBARI-19283
    https://issues.apache.org/jira/browse/AMBARI-19283


Repository: ambari


Description
-------

I added an "extensions_dir" parameter to the AlertSchedulerHandler class 
initializer, and made necessary changes to implement the parameter in 
script_alert.py, supply the parameter from Controller.py.


Diffs
-----

  ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py 65cc8b0 
  ambari-agent/src/main/python/ambari_agent/Controller.py 234795b 
  ambari-agent/src/main/python/ambari_agent/FileCache.py a9ea8f6 
  ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py 8dfa73e 
  ambari-agent/src/test/python/ambari_agent/TestAlertSchedulerHandler.py 
1202c81 
  ambari-agent/src/test/python/ambari_agent/TestAlerts.py 2bddc43 

Diff: https://reviews.apache.org/r/54994/diff/


Testing
-------

I modified the existing tests to use the new "extensions_dir" parameter in 
AlertSchedulerHandler, and added a new test case that ensures the parameter is 
being used correctly. Then I executed 'mvn clean test' in the ambari-agent 
directory, and all tests ran clean


Output (partial):

test_execute_alert (TestAlertSchedulerHandler.TestAlertSchedulerHandler) ... ok
test_execute_alert_emptyCommands 
(TestAlertSchedulerHandler.TestAlertSchedulerHandler) ... ok
test_execute_alert_from_extension 
(TestAlertSchedulerHandler.TestAlertSchedulerHandler) ... ok
test_execute_alert_noneCommands 
(TestAlertSchedulerHandler.TestAlertSchedulerHandler) ... ok
test_execute_alert_noneScheduler 
(TestAlertSchedulerHandler.TestAlertSchedulerHandler) ... ok
test_json_to_callable_ams (TestAlertSchedulerHandler.TestAlertSchedulerHandler) 
... ok
test_json_to_callable_metric 
(TestAlertSchedulerHandler.TestAlertSchedulerHandler) ... ok
test_json_to_callable_none 
(TestAlertSchedulerHandler.TestAlertSchedulerHandler) ... ok
test_json_to_callable_port 
(TestAlertSchedulerHandler.TestAlertSchedulerHandler) ... ok
test_json_to_callable_web (TestAlertSchedulerHandler.TestAlertSchedulerHandler) 
... ok
test_load_definitions (TestAlertSchedulerHandler.TestAlertSchedulerHandler) ... 
ok
test_load_definitions_noFile 
(TestAlertSchedulerHandler.TestAlertSchedulerHandler) ... ok
test_start (TestAlertSchedulerHandler.TestAlertSchedulerHandler) ... ok


Thanks,

Diego Santesteban

Reply via email to