fix minor spelling mistakes

Depends-On: I66527d559a09b02801fab6f1373f10ee9ba9a77c
Change-Id: I41919acad94e79cd2baea24731a661aed5a6ff20
This commit is contained in:
Eyal 2019-02-18 11:19:03 +02:00
parent c10cb80b6e
commit 7df96e1e24
13 changed files with 16 additions and 22 deletions

View File

@ -30,7 +30,7 @@ rules = [
name='get rca:all_tenants',
check_str=base.ROLE_ADMIN,
description='Show the root cause analysis on an alarm. Include alarms'
' of all tenants (if the user has the permisions)',
' of all tenants (if the user has the permissions)',
operations=[
{
'path': '/rca',

View File

@ -131,7 +131,7 @@ def timed_method(log_results=False, warn_above_sec=-1):
t1 = time.time()
result = function(*args, **kwargs)
t2 = time.time()
if warn_above_sec > 0 and warn_above_sec < t2 - t1:
if 0 < warn_above_sec < t2 - t1:
LOG.warning(
'Function %s runtime crossed limit %s seconds.',
function.__name__, t2 - t1)

View File

@ -118,7 +118,7 @@ class AlarmDriverBase(DriverBase):
return alarms_to_update
def _filter_get_valid(self, alarm, old_alarm):
def _filter_get_valid(self, alarm, _):
return alarm if self._is_valid(alarm) else None
def _filter_get_erroneous(self, alarm, old_alarm):

View File

@ -5,7 +5,7 @@ Configuring collectd to send notifications to Vitrage
2. Enable the python plugin with the following:
* Unmark the python plugin "LoadPlugin python"
* Edit the Python plugin as followes:
* Edit the Python plugin as follows:
<Plugin python>
ModulePath "/opt/stack/vitrage/vitrage/datasources/collectd/"
LogTraces true
@ -18,8 +18,8 @@ Configuring collectd to send notifications to Vitrage
</Module>
</Plugin>
* The MoudlePath should point to where the vitrage collectd datasource is
installed e.g. [vitrtage install dir]/datasources/collectd
* The ModulePath should point to where the vitrage collectd datasource is
installed e.g. [vitrage install dir]/datasources/collectd
* The transport url should point to the transport url defined in vitrage
.conf

View File

@ -33,9 +33,3 @@ class KubernetesProperties(object):
SPEC = 'spec'
CREATION_TIMESTAMP = 'creation_timestamp'
RESOURCES = 'resources'
class KubeClusterProperies(object):
KUBERNETES_CLUSTER = 'kubernetes.cluster'
CLUSTER_ID = 'Kubernetes Cluster'
AVAILABLE = 'available'

View File

@ -22,7 +22,7 @@ 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

View File

@ -108,7 +108,7 @@ class GraphPersistency(object):
if key in args:
continue
elif isinstance(content, dict) or isinstance(content, list):
return True # TODO(ihefetz): can be imporved
return True # TODO(ihefetz): can be improved
elif before.properties.get(key) != content:
return True
return False

View File

@ -28,7 +28,7 @@ LOG = log.getLogger(__name__)
class MetadataValidator(object):
@classmethod
def validate(self, metadata):
def validate(cls, metadata):
if not metadata:
return get_content_fault_result(62)

View File

@ -283,7 +283,7 @@ class ChangesConnection(object):
def create(self, change):
raise NotImplementedError('create change not implemented')
def add_end_changes(self, chnges_to_add, end_time):
def add_end_changes(self, changes_to_add, end_time):
raise NotImplementedError('add end changes not implemented')
def delete(self):

View File

@ -23,7 +23,7 @@ from oslo_db.sqlalchemy import utils as sqlalchemyutils
from oslo_log import log
from oslo_utils import timeutils
from vitrage.common.constants import EdgeLabel as ELable
from vitrage.common.constants import EdgeLabel as ELabel
from vitrage.common.constants import HistoryProps as HProps
from vitrage.common.exception import VitrageInputError
from vitrage.entity_graph.mappings.operational_alarm_severity import \
@ -399,7 +399,7 @@ class HistoryFacadeConnection(object):
session = self._engine_facade.get_session()
query = session.query(models.Edge)\
.filter(and_(getattr(models.Edge, filter_by).in_(alarm_ids),
models.Edge.label == ELable.CAUSES))
models.Edge.label == ELabel.CAUSES))
query = query.join(models.Edge.target)
query = self._add_project_filtering_to_query(query, proj_id, admin)

View File

@ -107,7 +107,7 @@ class KubernetesTransformerTest(base.BaseTest):
def _validate_cluster_neighbors(self, neighbor, event):
# Create expected neigbor
# Create expected neighbor
time = event[DSProps.SAMPLE_DATE]
external_id = event['resources'][0][kubProp.EXTERNALID]
properties = {

View File

@ -210,7 +210,7 @@ class TemplateSyntaxValidatorTest(base.BaseTest):
template = file_utils.load_yaml_file(template_path)
self._test_execution_with_fault_result(template, 4)
def test_template_with_include_with_no_defnitions(self):
def test_template_with_include_with_no_definitions(self):
template_path = self.def_template_dir_path +\
'/templates/no_definitions_only_include.yaml'
template = file_utils.load_yaml_file(template_path)

View File

@ -53,10 +53,10 @@ class TemplateLoaderTest(base.BaseTest):
template_definition = file_utils.load_yaml_file(template_path, True)
def_templates_path = self.DEF_TEMPLATE_TESTS_DIR + \
'/definition_templates'
def_demplates_list = file_utils.load_yaml_files(
def_templates_list = file_utils.load_yaml_files(
def_templates_path)
def_templates_dict = utils.get_def_templates_dict_from_list(
def_demplates_list)
def_templates_list)
template_data = get_template_data(template_definition,
def_templates_dict)
entities = template_data.entities