diff --git a/doc/source/contributor/add-new-datasource.rst b/doc/source/contributor/add-new-datasource.rst index 783368cdb..67831de51 100644 --- a/doc/source/contributor/add-new-datasource.rst +++ b/doc/source/contributor/add-new-datasource.rst @@ -96,7 +96,7 @@ tuple with the following details: Note that for every driver there should be a matching Transformer. A transformer should inherit from -``vitrage.datasoures.transformer_base.TransformerBase`` class and +``vitrage.datasources.transformer_base.TransformerBase`` class and must implement the following methods: +----------------------------------+------------------------------------+----------------------------------------+ diff --git a/doc/source/contributor/templates-loading.rst b/doc/source/contributor/templates-loading.rst index 8e07b47c6..f4b09192b 100644 --- a/doc/source/contributor/templates-loading.rst +++ b/doc/source/contributor/templates-loading.rst @@ -53,7 +53,7 @@ Let's take a basic template as example action_target: target: resource -``TemplateData`` will build ``entites``, ``relationships`` and most importantly +``TemplateData`` will build ``entities``, ``relationships`` and most importantly ``scenarios`` out from the definition. .. code-block:: python diff --git a/doc/source/contributor/zabbix_vitrage.rst b/doc/source/contributor/zabbix_vitrage.rst index 6d6321a5f..da150422f 100644 --- a/doc/source/contributor/zabbix_vitrage.rst +++ b/doc/source/contributor/zabbix_vitrage.rst @@ -28,7 +28,7 @@ Zabbix web ui configuration To forward zabbix events to Vitrage a new media script needs to be created and associated with a user. Follow the steps below as a Zabbix Admin user: -1. Create a new media type [Admininstration > Media Types > Create Media Type] +1. Create a new media type [Administration > Media Types > Create Media Type] | **Name:** Vitrage Notifications | **Type:** Script diff --git a/vitrage/graph/query.py b/vitrage/graph/query.py index 3ba65c3ab..18a7336dc 100644 --- a/vitrage/graph/query.py +++ b/vitrage/graph/query.py @@ -93,15 +93,15 @@ def _create_query_expression(query, parent_operator=None): # Recursion evaluate leaf (stop condition) elif parent_operator in operators: for key, val in query.items(): - expressions.append('item.get(' + _evaluatable_str(key) + ')' + - parent_operator + ' ' + _evaluatable_str(val)) + expressions.append('item.get(' + _evaluable_str(key) + ')' + + parent_operator + ' ' + _evaluable_str(val)) return _join_logical_operator('and', expressions) else: raise VitrageError('invalid partial query format', parent_operator, query) -def _evaluatable_str(value): +def _evaluable_str(value): """wrap string/unicode with back tick""" if isinstance(value, six.string_types): return '\'' + value + '\'' diff --git a/vitrage/notifier/plugins/snmp/snmp_sender.py b/vitrage/notifier/plugins/snmp/snmp_sender.py index 8846f86d4..1c5080635 100644 --- a/vitrage/notifier/plugins/snmp/snmp_sender.py +++ b/vitrage/notifier/plugins/snmp/snmp_sender.py @@ -65,7 +65,7 @@ class SnmpSender(SnmpSenderBase): self._get_var_binds(alarm_data), alarm_oid) else: - LOG.info('Vitrage snmp Info: Unregconized alarm. Alarm type: %s', + LOG.info('Vitrage snmp Info: Unrecognized alarm. Alarm type: %s', alarm_data[VProps.NAME]) def _get_details(self, alarm_data): diff --git a/vitrage/tests/functional/api_handler/test_apis.py b/vitrage/tests/functional/api_handler/test_apis.py index cae2dc8ef..0ac3e7a1d 100755 --- a/vitrage/tests/functional/api_handler/test_apis.py +++ b/vitrage/tests/functional/api_handler/test_apis.py @@ -324,8 +324,8 @@ class TestApis(TestEntityGraphUnitBase): # Test assertions self.assertIsNotNone(resource) - self._check_resource_propeties(resource, 'zone_1', - NOVA_ZONE_DATASOURCE) + self._check_resource_properties(resource, 'zone_1', + NOVA_ZONE_DATASOURCE) def test_resource_show_with_not_admin_and_no_project_resource(self): # Setup @@ -351,9 +351,9 @@ class TestApis(TestEntityGraphUnitBase): # Test assertions self.assertIsNotNone(resource) - self._check_resource_propeties(resource, 'instance_2', - NOVA_INSTANCE_DATASOURCE, - project_id='project_1') + self._check_resource_properties(resource, 'instance_2', + NOVA_INSTANCE_DATASOURCE, + project_id='project_1') def test_resource_show_with_not_admin_and_resource_in_other_project(self): # Setup @@ -379,9 +379,9 @@ class TestApis(TestEntityGraphUnitBase): # Test assertions self.assertIsNotNone(resource) - self._check_resource_propeties(resource, 'instance_2', - NOVA_INSTANCE_DATASOURCE, - project_id='project_1') + self._check_resource_properties(resource, 'instance_2', + NOVA_INSTANCE_DATASOURCE, + project_id='project_1') def test_resource_show_with_admin_and_resource_in_other_project(self): # Setup @@ -395,9 +395,9 @@ class TestApis(TestEntityGraphUnitBase): # Test assertions self.assertIsNotNone(resource) - self._check_resource_propeties(resource, 'instance_2', - NOVA_INSTANCE_DATASOURCE, - project_id='project_1') + self._check_resource_properties(resource, 'instance_2', + NOVA_INSTANCE_DATASOURCE, + project_id='project_1') def _check_projects_entities(self, alarms, @@ -415,8 +415,8 @@ class TestApis(TestEntityGraphUnitBase): (tmp_project_id and tmp_project_id == project_id)) self.assertEqual(True, condition) - def _check_resource_propeties(self, resource, vitrage_id, - resource_type, project_id=None): + def _check_resource_properties(self, resource, vitrage_id, + resource_type, project_id=None): self.assertEqual(resource[VProps.VITRAGE_ID], vitrage_id) self.assertEqual(resource[VProps.ID], vitrage_id) self.assertEqual(resource[VProps.VITRAGE_CATEGORY], diff --git a/vitrage/tests/mocks/mock_driver.py b/vitrage/tests/mocks/mock_driver.py index c0cc36ec0..45cd6cb3f 100644 --- a/vitrage/tests/mocks/mock_driver.py +++ b/vitrage/tests/mocks/mock_driver.py @@ -253,8 +253,7 @@ def simple_stack_generators(stack_num, instance_and_volume_num, :param update_vals: number of values from update event :param update_events: number of events from update event :param stack_num: number of stacks - :param volume_num: number of volumes - :param instance_num: number of instances + :param instance_and_volume_num: number of volumes and instances :param snapshot_events: number of snapshot events per host :param snap_vals: preset vals for ALL snapshot events :return: generators for volume_num volumes as specified @@ -299,7 +298,7 @@ def simple_consistency_generators(consistency_num, update_events=0, :param update_vals: number of values from update event :param update_events: number of events from update event - :param consistency_num: number of consisteny events + :param consistency_num: number of consistency events :param snap_vals: preset vals for ALL snapshot events :return: generators for consistency_num consistency events as specified """ diff --git a/vitrage/tests/unit/datasources/zabbix/test_zabbix_driver.py b/vitrage/tests/unit/datasources/zabbix/test_zabbix_driver.py index 97e23aa46..08a2ffb89 100644 --- a/vitrage/tests/unit/datasources/zabbix/test_zabbix_driver.py +++ b/vitrage/tests/unit/datasources/zabbix/test_zabbix_driver.py @@ -121,7 +121,7 @@ class ZabbixDriverTest(ZabbixBaseTest): self._assert_contains(expected_alarm2, alarms) # Step 4 - Check inactive alarms. Get all function should return - # inactive alarm (alarm that teir status has changed to OK) + # inactive alarm (alarm that its status has changed to OK) # Test setup alarm_data1 = self._extract_alarm_data() alarm_data2 = self._extract_alarm_data(z_resource_name='compute-2')