Refactors code in OpenStack plugin 51/6651/4
authorBenjamin Diaz <bdiaz@whitestack.com>
Mon, 8 Oct 2018 18:34:12 +0000 (15:34 -0300)
committerBenjamin Diaz <bdiaz@whitestack.com>
Tue, 16 Oct 2018 19:52:00 +0000 (16:52 -0300)
commite80db311a29dc8562dc84ae3336af167bac2ec5b
tree74993129b36312d5ab0923b624af22c18db6369b
parent3729638a9d26e07d551cf4ad7ac92c553e64cc6d
Refactors code in OpenStack plugin

Continues refactor process on OpenStack metrics plugin.
Delegates exception handling to the main metric handler,
removing exception management from specific function calls.
Extracts response generation code into single method.
Adds 'status' param in message responses where it was missing.
Modifies tests accordingly.

Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: I6ad27734f37708f5ccbef13e322723225545db4e
osm_mon/plugins/OpenStack/Aodh/alarming.py
osm_mon/plugins/OpenStack/Aodh/notifier.py
osm_mon/plugins/OpenStack/Gnocchi/metrics.py
osm_mon/plugins/OpenStack/response.py
osm_mon/test/OpenStack/integration/test_metric_integration.py
osm_mon/test/OpenStack/integration/test_notify_alarm.py
osm_mon/test/OpenStack/unit/test_metric_calls.py
osm_mon/test/OpenStack/unit/test_metric_req.py