fix minor spelling mistakes
Depends-On: I66527d559a09b02801fab6f1373f10ee9ba9a77c Change-Id: I41919acad94e79cd2baea24731a661aed5a6ff20
This commit is contained in:
parent
c10cb80b6e
commit
7df96e1e24
|
@ -30,7 +30,7 @@ rules = [
|
||||||
name='get rca:all_tenants',
|
name='get rca:all_tenants',
|
||||||
check_str=base.ROLE_ADMIN,
|
check_str=base.ROLE_ADMIN,
|
||||||
description='Show the root cause analysis on an alarm. Include alarms'
|
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=[
|
operations=[
|
||||||
{
|
{
|
||||||
'path': '/rca',
|
'path': '/rca',
|
||||||
|
|
|
@ -131,7 +131,7 @@ def timed_method(log_results=False, warn_above_sec=-1):
|
||||||
t1 = time.time()
|
t1 = time.time()
|
||||||
result = function(*args, **kwargs)
|
result = function(*args, **kwargs)
|
||||||
t2 = time.time()
|
t2 = time.time()
|
||||||
if warn_above_sec > 0 and warn_above_sec < t2 - t1:
|
if 0 < warn_above_sec < t2 - t1:
|
||||||
LOG.warning(
|
LOG.warning(
|
||||||
'Function %s runtime crossed limit %s seconds.',
|
'Function %s runtime crossed limit %s seconds.',
|
||||||
function.__name__, t2 - t1)
|
function.__name__, t2 - t1)
|
||||||
|
|
|
@ -118,7 +118,7 @@ class AlarmDriverBase(DriverBase):
|
||||||
|
|
||||||
return alarms_to_update
|
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
|
return alarm if self._is_valid(alarm) else None
|
||||||
|
|
||||||
def _filter_get_erroneous(self, alarm, old_alarm):
|
def _filter_get_erroneous(self, alarm, old_alarm):
|
||||||
|
|
|
@ -5,7 +5,7 @@ Configuring collectd to send notifications to Vitrage
|
||||||
|
|
||||||
2. Enable the python plugin with the following:
|
2. Enable the python plugin with the following:
|
||||||
* Unmark the python plugin "LoadPlugin python"
|
* Unmark the python plugin "LoadPlugin python"
|
||||||
* Edit the Python plugin as followes:
|
* Edit the Python plugin as follows:
|
||||||
<Plugin python>
|
<Plugin python>
|
||||||
ModulePath "/opt/stack/vitrage/vitrage/datasources/collectd/"
|
ModulePath "/opt/stack/vitrage/vitrage/datasources/collectd/"
|
||||||
LogTraces true
|
LogTraces true
|
||||||
|
@ -18,8 +18,8 @@ Configuring collectd to send notifications to Vitrage
|
||||||
</Module>
|
</Module>
|
||||||
</Plugin>
|
</Plugin>
|
||||||
|
|
||||||
* The MoudlePath should point to where the vitrage collectd datasource is
|
* The ModulePath should point to where the vitrage collectd datasource is
|
||||||
installed e.g. [vitrtage install dir]/datasources/collectd
|
installed e.g. [vitrage install dir]/datasources/collectd
|
||||||
* The transport url should point to the transport url defined in vitrage
|
* The transport url should point to the transport url defined in vitrage
|
||||||
.conf
|
.conf
|
||||||
|
|
||||||
|
|
|
@ -33,9 +33,3 @@ class KubernetesProperties(object):
|
||||||
SPEC = 'spec'
|
SPEC = 'spec'
|
||||||
CREATION_TIMESTAMP = 'creation_timestamp'
|
CREATION_TIMESTAMP = 'creation_timestamp'
|
||||||
RESOURCES = 'resources'
|
RESOURCES = 'resources'
|
||||||
|
|
||||||
|
|
||||||
class KubeClusterProperies(object):
|
|
||||||
KUBERNETES_CLUSTER = 'kubernetes.cluster'
|
|
||||||
CLUSTER_ID = 'Kubernetes Cluster'
|
|
||||||
AVAILABLE = 'available'
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ Configuration
|
||||||
To forward zabbix events to Vitrage a new media script needs to be created and
|
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:
|
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
|
Name: Vitrage Notifications
|
||||||
|
|
|
@ -108,7 +108,7 @@ class GraphPersistency(object):
|
||||||
if key in args:
|
if key in args:
|
||||||
continue
|
continue
|
||||||
elif isinstance(content, dict) or isinstance(content, list):
|
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:
|
elif before.properties.get(key) != content:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
|
@ -28,7 +28,7 @@ LOG = log.getLogger(__name__)
|
||||||
class MetadataValidator(object):
|
class MetadataValidator(object):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def validate(self, metadata):
|
def validate(cls, metadata):
|
||||||
if not metadata:
|
if not metadata:
|
||||||
return get_content_fault_result(62)
|
return get_content_fault_result(62)
|
||||||
|
|
||||||
|
|
|
@ -283,7 +283,7 @@ class ChangesConnection(object):
|
||||||
def create(self, change):
|
def create(self, change):
|
||||||
raise NotImplementedError('create change not implemented')
|
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')
|
raise NotImplementedError('add end changes not implemented')
|
||||||
|
|
||||||
def delete(self):
|
def delete(self):
|
||||||
|
|
|
@ -23,7 +23,7 @@ from oslo_db.sqlalchemy import utils as sqlalchemyutils
|
||||||
from oslo_log import log
|
from oslo_log import log
|
||||||
from oslo_utils import timeutils
|
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.constants import HistoryProps as HProps
|
||||||
from vitrage.common.exception import VitrageInputError
|
from vitrage.common.exception import VitrageInputError
|
||||||
from vitrage.entity_graph.mappings.operational_alarm_severity import \
|
from vitrage.entity_graph.mappings.operational_alarm_severity import \
|
||||||
|
@ -399,7 +399,7 @@ class HistoryFacadeConnection(object):
|
||||||
session = self._engine_facade.get_session()
|
session = self._engine_facade.get_session()
|
||||||
query = session.query(models.Edge)\
|
query = session.query(models.Edge)\
|
||||||
.filter(and_(getattr(models.Edge, filter_by).in_(alarm_ids),
|
.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 = query.join(models.Edge.target)
|
||||||
query = self._add_project_filtering_to_query(query, proj_id, admin)
|
query = self._add_project_filtering_to_query(query, proj_id, admin)
|
||||||
|
|
|
@ -107,7 +107,7 @@ class KubernetesTransformerTest(base.BaseTest):
|
||||||
|
|
||||||
def _validate_cluster_neighbors(self, neighbor, event):
|
def _validate_cluster_neighbors(self, neighbor, event):
|
||||||
|
|
||||||
# Create expected neigbor
|
# Create expected neighbor
|
||||||
time = event[DSProps.SAMPLE_DATE]
|
time = event[DSProps.SAMPLE_DATE]
|
||||||
external_id = event['resources'][0][kubProp.EXTERNALID]
|
external_id = event['resources'][0][kubProp.EXTERNALID]
|
||||||
properties = {
|
properties = {
|
||||||
|
|
|
@ -210,7 +210,7 @@ class TemplateSyntaxValidatorTest(base.BaseTest):
|
||||||
template = file_utils.load_yaml_file(template_path)
|
template = file_utils.load_yaml_file(template_path)
|
||||||
self._test_execution_with_fault_result(template, 4)
|
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 +\
|
template_path = self.def_template_dir_path +\
|
||||||
'/templates/no_definitions_only_include.yaml'
|
'/templates/no_definitions_only_include.yaml'
|
||||||
template = file_utils.load_yaml_file(template_path)
|
template = file_utils.load_yaml_file(template_path)
|
||||||
|
|
|
@ -53,10 +53,10 @@ class TemplateLoaderTest(base.BaseTest):
|
||||||
template_definition = file_utils.load_yaml_file(template_path, True)
|
template_definition = file_utils.load_yaml_file(template_path, True)
|
||||||
def_templates_path = self.DEF_TEMPLATE_TESTS_DIR + \
|
def_templates_path = self.DEF_TEMPLATE_TESTS_DIR + \
|
||||||
'/definition_templates'
|
'/definition_templates'
|
||||||
def_demplates_list = file_utils.load_yaml_files(
|
def_templates_list = file_utils.load_yaml_files(
|
||||||
def_templates_path)
|
def_templates_path)
|
||||||
def_templates_dict = utils.get_def_templates_dict_from_list(
|
def_templates_dict = utils.get_def_templates_dict_from_list(
|
||||||
def_demplates_list)
|
def_templates_list)
|
||||||
template_data = get_template_data(template_definition,
|
template_data = get_template_data(template_definition,
|
||||||
def_templates_dict)
|
def_templates_dict)
|
||||||
entities = template_data.entities
|
entities = template_data.entities
|
||||||
|
|
Loading…
Reference in New Issue