From ba8add220b6814310dbd62917b08985b114df8d2 Mon Sep 17 00:00:00 2001 From: Liat Har-Tal Date: Sun, 13 Mar 2016 12:09:34 +0000 Subject: [PATCH] Spelling error correction Change-Id: Id652a290015612e953a7fb0a845a5f10af382730 --- doc/source/alarm-state-config.rst | 4 +-- etc/vitrage/states_plugins/nagios.yaml | 2 +- .../states/normalized_alarm_severity.py | 2 +- .../erroneous_states_plugins/nagios.yaml | 2 +- .../resources/states_plugins/nagios.yaml | 2 +- .../resources/states_plugins/vitrage.yaml | 29 +++++++++++++++++++ .../entity_graph/states/test_state_manager.py | 2 +- 7 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 vitrage/tests/resources/states_plugins/vitrage.yaml diff --git a/doc/source/alarm-state-config.rst b/doc/source/alarm-state-config.rst index 522570489..d06a04c6b 100644 --- a/doc/source/alarm-state-config.rst +++ b/doc/source/alarm-state-config.rst @@ -51,7 +51,7 @@ State configuration yaml file has to be defined for all the plugins which were c The following file will map alarm states. Original states 'CRITICAL' and 'DOWN' will be mapped to normalized state 'CRITICAL'. -Normalized state 'SEVER' has no original states. +Normalized state 'SEVERE' has no original states. Original state 'WARNING' is mapped to normalized state 'WARNING', etc. :: @@ -65,7 +65,7 @@ Original state 'WARNING' is mapped to normalized state 'WARNING', etc. - name: CRITICAL - name: DOWN - normalized state: - name: SEVER + name: SEVERE priority: 40 original states: - normalized state: diff --git a/etc/vitrage/states_plugins/nagios.yaml b/etc/vitrage/states_plugins/nagios.yaml index f67c35c06..b8676a81c 100644 --- a/etc/vitrage/states_plugins/nagios.yaml +++ b/etc/vitrage/states_plugins/nagios.yaml @@ -7,7 +7,7 @@ states: - name: CRITICAL - name: DOWN - normalized state: - name: SEVER + name: SEVERE priority: 40 original states: - normalized state: diff --git a/vitrage/entity_graph/states/normalized_alarm_severity.py b/vitrage/entity_graph/states/normalized_alarm_severity.py index 4b9c81ec6..2ff5eeaf2 100644 --- a/vitrage/entity_graph/states/normalized_alarm_severity.py +++ b/vitrage/entity_graph/states/normalized_alarm_severity.py @@ -15,7 +15,7 @@ class NormalizedAlarmSeverity(object): CRITICAL = 'CRITICAL' - SEVER = 'SEVER' + SEVERE = 'SEVERE' WARNING = 'WARNING' DISABLED = 'DISABLED' UNKNOWN = 'UNKNOWN' diff --git a/vitrage/tests/resources/states_plugins/erroneous_states_plugins/nagios.yaml b/vitrage/tests/resources/states_plugins/erroneous_states_plugins/nagios.yaml index f67c35c06..b8676a81c 100644 --- a/vitrage/tests/resources/states_plugins/erroneous_states_plugins/nagios.yaml +++ b/vitrage/tests/resources/states_plugins/erroneous_states_plugins/nagios.yaml @@ -7,7 +7,7 @@ states: - name: CRITICAL - name: DOWN - normalized state: - name: SEVER + name: SEVERE priority: 40 original states: - normalized state: diff --git a/vitrage/tests/resources/states_plugins/nagios.yaml b/vitrage/tests/resources/states_plugins/nagios.yaml index f67c35c06..b8676a81c 100644 --- a/vitrage/tests/resources/states_plugins/nagios.yaml +++ b/vitrage/tests/resources/states_plugins/nagios.yaml @@ -7,7 +7,7 @@ states: - name: CRITICAL - name: DOWN - normalized state: - name: SEVER + name: SEVERE priority: 40 original states: - normalized state: diff --git a/vitrage/tests/resources/states_plugins/vitrage.yaml b/vitrage/tests/resources/states_plugins/vitrage.yaml new file mode 100644 index 000000000..bdcd74f0d --- /dev/null +++ b/vitrage/tests/resources/states_plugins/vitrage.yaml @@ -0,0 +1,29 @@ +category: ALARM +states: + - normalized state: + name: CRITICAL + priority: 50 + original states: + - name: CRITICAL + - normalized state: + name: SEVERE + priority: 40 + original states: + - name: SEVERE + - name: MAJOR + - normalized state: + name: WARNING + priority: 30 + original states: + - name: WARNING + - name: MINOR + - normalized state: + name: UNKNOWN + priority: 20 + original states: + - name: UNKNOWN + - normalized state: + name: DISABLED + priority: 10 + original states: + - name: OK diff --git a/vitrage/tests/unit/entity_graph/states/test_state_manager.py b/vitrage/tests/unit/entity_graph/states/test_state_manager.py index 56d440908..8e2c0eba9 100644 --- a/vitrage/tests/unit/entity_graph/states/test_state_manager.py +++ b/vitrage/tests/unit/entity_graph/states/test_state_manager.py @@ -60,7 +60,7 @@ class TestStateManager(base.BaseTest): state_manager = StateManager(self.conf) # test assertions - self.assertEqual(len(self.conf.synchronizer_plugins.plugin_type), + self.assertEqual(len(self.conf.synchronizer_plugins.plugin_type) + 1, len(state_manager.states_plugins)) def test_load_state_plugins_with_errors(self):