lists.checkmk.com
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
List overview
Download
Checkmk git commits
April 2019
----- 2024 -----
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
checkmk-commits@lists.checkmk.com
15 participants
599 discussions
Start a n
N
ew thread
Cleaned up AWS cloudwatch fake clients
by Simon Betz
Module: check_mk Branch: master Commit: 978a90d1a2fe38b283602695df9994dcaa199436 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=978a90d1a2fe38…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Wed Apr 24 12:48:50 2019 +0200 Cleaned up AWS cloudwatch fake clients Change-Id: I6b96284789c70117df28ad1d448e75c6dbc24c1e --- .../agent_aws/agent_aws_fake_clients.py | 6 +++++ .../agent_aws/test_agent_aws_cloudwatch.py | 10 +------- .../agent_aws/test_agent_aws_costs_and_usage.py | 1 + .../special_agents/agent_aws/test_agent_aws_ec2.py | 27 ++-------------------- .../special_agents/agent_aws/test_agent_aws_elb.py | 27 ++-------------------- .../special_agents/agent_aws/test_agent_aws_s3.py | 27 ++-------------------- 6 files changed, 14 insertions(+), 84 deletions(-) diff --git a/tests/unit/cmk/special_agents/agent_aws/agent_aws_fake_clients.py b/tests/unit/cmk/special_agents/agent_aws/agent_aws_fake_clients.py index 02d5e23..29674be 100644 --- a/tests/unit/cmk/special_agents/agent_aws/agent_aws_fake_clients.py +++ b/tests/unit/cmk/special_agents/agent_aws/agent_aws_fake_clients.py @@ -498,6 +498,12 @@ class RDSDescribeDBInstancesInstanceCreator(InstanceCreator): class FakeCloudwatchClient(object): + def describe_alarms(self, AlarmNames=None): + alarms = CloudwatchDescribeAlarmsInstanceCreator.create_instances(amount=2) + if AlarmNames: + alarms = [alarm for alarm in alarms if alarm['AlarmName'] in AlarmNames] + return {'MetricAlarms': alarms, 'NextToken': 'string'} + def get_metric_data(self, MetricDataQueries, StartTime='START', EndTime='END'): results = [] for query in MetricDataQueries: diff --git a/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_cloudwatch.py b/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_cloudwatch.py index 035f37f..8a30643 100644 --- a/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_cloudwatch.py +++ b/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_cloudwatch.py @@ -2,7 +2,7 @@ import pytest from agent_aws_fake_clients import ( - CloudwatchDescribeAlarmsInstanceCreator,) + FakeCloudwatchClient,) from cmk.special_agents.agent_aws import ( AWSConfig, @@ -12,14 +12,6 @@ from cmk.special_agents.agent_aws import ( ) -class FakeCloudwatchClient(object): - def describe_alarms(self, AlarmNames=None): - alarms = CloudwatchDescribeAlarmsInstanceCreator.create_instances(amount=2) - if AlarmNames: - alarms = [alarm for alarm in alarms if alarm['AlarmName'] in AlarmNames] - return {'MetricAlarms': alarms, 'NextToken': 'string'} - - @pytest.fixture() def get_cloudwatch_alarms_sections(): def _create_cloudwatch_alarms_sections(alarm_names): diff --git a/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_costs_and_usage.py b/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_costs_and_usage.py index 7b1e487..e85a6d2 100644 --- a/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_costs_and_usage.py +++ b/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_costs_and_usage.py @@ -2,6 +2,7 @@ from agent_aws_fake_clients import ( CEGetCostsAndUsageInstanceCreator,) + from cmk.special_agents.agent_aws import ( AWSConfig, CostsAndUsage, diff --git a/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_ec2.py b/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_ec2.py index 79fd1d1..5c5f3c0 100644 --- a/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_ec2.py +++ b/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_ec2.py @@ -1,6 +1,8 @@ # encoding: utf-8 import pytest +from agent_aws_fake_clients import ( + FakeCloudwatchClient,) from cmk.special_agents.agent_aws import ( _get_ec2_piggyback_hostname, @@ -332,31 +334,6 @@ inst2 = { # '----------------------------------------------------------------------' -class FakeCloudwatchClient(object): - def get_metric_data(self, MetricDataQueries, StartTime='START', EndTime='END'): - results = [] - for query in MetricDataQueries: - results.append({ - 'Id': query['Id'], - 'Label': query['Label'], - 'Timestamps': ["1970-01-01",], - 'Values': [123.0,], - 'StatusCode': "'Complete' | 'InternalError' | 'PartialData'", - 'Messages': [{ - 'Code': 'string1', - 'Value': 'string1' - },] - }) - return { - 'MetricDataResults': results, - 'NextToken': 'string', - 'Messages': [{ - 'Code': 'string', - 'Value': 'string' - },] - } - - class FakeEC2Client(object): def describe_instances(self, InstanceIds=None, Filters=None): return { diff --git a/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_elb.py b/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_elb.py index f30faa2..89490dd 100644 --- a/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_elb.py +++ b/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_elb.py @@ -1,6 +1,8 @@ # encoding: utf-8 import pytest +from agent_aws_fake_clients import ( + FakeCloudwatchClient,) from cmk.special_agents.agent_aws import ( AWSConfig, @@ -288,31 +290,6 @@ elbv2_lb3 = { # '----------------------------------------------------------------------' -class FakeCloudwatchClient(object): - def get_metric_data(self, MetricDataQueries, StartTime='START', EndTime='END'): - results = [] - for query in MetricDataQueries: - results.append({ - 'Id': query['Id'], - 'Label': query['Label'], - 'Timestamps': ["1970-01-01",], - 'Values': [123.0,], - 'StatusCode': "'Complete' | 'InternalError' | 'PartialData'", - 'Messages': [{ - 'Code': 'string1', - 'Value': 'string1' - },] - }) - return { - 'MetricDataResults': results, - 'NextToken': 'string', - 'Messages': [{ - 'Code': 'string', - 'Value': 'string' - },] - } - - class FakeELBClient(object): def describe_load_balancers(self, LoadBalancerNames=None): return {'LoadBalancerDescriptions': [elb_lb1, elb_lb2, elb_lb3], 'NextMarker': 'string'} diff --git a/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_s3.py b/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_s3.py index 7fd3660..eb217be 100644 --- a/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_s3.py +++ b/tests/unit/cmk/special_agents/agent_aws/test_agent_aws_s3.py @@ -2,9 +2,11 @@ import pytest from agent_aws_fake_clients import ( + FakeCloudwatchClient, S3ListBucketsInstanceCreator, S3BucketTaggingInstanceCreator, ) + from cmk.special_agents.agent_aws import ( AWSConfig, ResultDistributor, @@ -15,31 +17,6 @@ from cmk.special_agents.agent_aws import ( ) -class FakeCloudwatchClient(object): - def get_metric_data(self, MetricDataQueries, StartTime='START', EndTime='END'): - results = [] - for query in MetricDataQueries: - results.append({ - 'Id': query['Id'], - 'Label': query['Label'], - 'Timestamps': ["1970-01-01",], - 'Values': [123.0,], - 'StatusCode': "'Complete' | 'InternalError' | 'PartialData'", - 'Messages': [{ - 'Code': 'string1', - 'Value': 'string1' - },] - }) - return { - 'MetricDataResults': results, - 'NextToken': 'string', - 'Messages': [{ - 'Code': 'string', - 'Value': 'string' - },] - } - - class FakeS3Client(object): def list_buckets(self): return {
5 years, 5 months
1
0
0
0
Cleaned up AWS cloudwatch test
by Simon Betz
Module: check_mk Branch: master Commit: 2dbf8e886b3e9878d32b6e4b6a4d7d6c5f004e32 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2dbf8e886b3e98…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Wed Apr 24 10:49:52 2019 +0200 Cleaned up AWS cloudwatch test Change-Id: Ic0679db27e06e1a94a6bd86e16516aced80cdebd --- .../agent_aws/test_agent_aws_cloudwatch.py | 206 +++++---------------- 1 file changed, 43 insertions(+), 163 deletions(-) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=2dbf8e886b…
5 years, 5 months
1
0
0
0
Started agent AWS fake clients
by Simon Betz
Module: check_mk Branch: master Commit: 0adb21af44da92ba6dccdb0bfc4565d8c9957a31 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0adb21af44da92…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Tue Apr 23 12:10:12 2019 +0200 Started agent AWS fake clients Change-Id: I7dfc3740c0182a677b59f0fc7dda5f4a9d620ed2 --- .../agent_aws/agent_aws_fake_clients.py | 273 +++++++++++++++++++++ .../special_agents/agent_aws/test_agent_aws_s3.py | 248 ++++++++++--------- 2 files changed, 396 insertions(+), 125 deletions(-) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=0adb21af44…
5 years, 5 months
1
0
0
0
Add AWS/EC2 tests
by Simon Betz
Module: check_mk Branch: master Commit: 3e68a36b0fa27e6edbd2a67a36d8d087096e7d33 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3e68a36b0fa27e…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Thu Apr 18 11:33:45 2019 +0200 Add AWS/EC2 tests Change-Id: Ie899ca8ee910ae409bb5be89f7ee9af25de03f1f --- .../unit/cmk/special_agents/test_agent_aws_ec2.py | 589 ++++++++++++++++++--- 1 file changed, 508 insertions(+), 81 deletions(-) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=3e68a36b0f…
5 years, 5 months
1
0
0
0
aws_cloudwatch_alarms: Fixed missing parse function
by Simon Betz
Module: check_mk Branch: master Commit: 4936eb2a5312464c685cfc5afb7d8957fe643ba1 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4936eb2a531246…
Author: Simon Betz <si(a)mathias-kettner.de> Date: Wed Apr 24 12:37:45 2019 +0200 aws_cloudwatch_alarms: Fixed missing parse function Change-Id: I13c83938428e4ee59fb7ed7feb154e171d197b30 --- checks/aws_cloudwatch_alarms | 1 + 1 file changed, 1 insertion(+) diff --git a/checks/aws_cloudwatch_alarms b/checks/aws_cloudwatch_alarms index 0e5f9f8..0cb9bad 100644 --- a/checks/aws_cloudwatch_alarms +++ b/checks/aws_cloudwatch_alarms @@ -54,6 +54,7 @@ def check_aws_cloudwatch_alarms(item, params, parsed): check_info['aws_cloudwatch_alarms'] = { + 'parse_function': parse_aws, 'inventory_function': discover_single, 'check_function': check_aws_cloudwatch_alarms, 'service_description': 'AWS/Cloudwatch Alarms',
5 years, 5 months
1
0
0
0
Fix missing integration test refactoring and cleanup tests a bit
by Lars Michelsen
Module: check_mk Branch: master Commit: d0566e0dac53d807237c1fb986f7a483d5e910c9 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d0566e0dac53d8…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Wed Apr 24 14:37:17 2019 +0200 Fix missing integration test refactoring and cleanup tests a bit Change-Id: Ieb0836399d4d9df6da38ec558a8b7905536c80d2 --- tests/integration/cmk_base/test_data_sources.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/integration/cmk_base/test_data_sources.py b/tests/integration/cmk_base/test_data_sources.py index 11543c2..51ed401 100644 --- a/tests/integration/cmk_base/test_data_sources.py +++ b/tests/integration/cmk_base/test_data_sources.py @@ -6,7 +6,7 @@ # caching is checked import pytest # type: ignore -from testlib import web, repo_path +from testlib import web, repo_path # pylint: disable=unused-import import cmk_base.config as config import cmk_base.modes @@ -189,19 +189,16 @@ def test_mode_inventory_caching(test_cfg, hosts, cache, force, monkeypatch): kwargs.update(force[1]) if cache[0] is None: - if not hosts[0]: - kwargs["_may_use_cache_file"] = True - else: - kwargs["_may_use_cache_file"] = False + kwargs["_may_use_cache_file"] = not hosts[0] _patch_data_source_run(monkeypatch, **kwargs) config_cache = config.get_config_cache() try: - if cache[0] == True: + if cache[0] is True: cmk_base.modes.check_mk.option_cache() - elif cache[0] == False: + elif cache[0] is False: cmk_base.modes.check_mk.option_no_cache() # --no-cache options = {} @@ -218,7 +215,8 @@ def test_mode_inventory_caching(test_cfg, hosts, cache, force, monkeypatch): else: valid_hosts = hosts[0] - num_runs = len([h for h in valid_hosts if not config.is_cluster(h)]) * 2 + num_runs = len([h for h in valid_hosts if not config_cache.get_host_config(h).is_cluster + ]) * 2 assert _counter_run == num_runs finally:
5 years, 5 months
1
0
0
0
Fix label links in folded HW/SW inventory tree
by Lars Michelsen
Module: check_mk Branch: master Commit: 077ec9b8bdfba5aef95472b1dc51b69ef97cd169 URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=077ec9b8bdfba5…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Wed Apr 24 14:30:47 2019 +0200 Fix label links in folded HW/SW inventory tree Change-Id: I45aee6dbf9d23f862b8d9cc4e739a6beef45f071 --- cmk/gui/view_utils.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cmk/gui/view_utils.py b/cmk/gui/view_utils.py index c8de64b..bbaa15f 100644 --- a/cmk/gui/view_utils.py +++ b/cmk/gui/view_utils.py @@ -167,9 +167,11 @@ def _render_tag_group(tg_id, tag, object_type, with_link, label_type, label_sour else: raise NotImplementedError() - url = html.makeuri_contextless([ - ("filled_in", "filter"), - ("search", "Search"), - ("view_name", "searchhost" if object_type == "host" else "searchsvc"), - ] + type_filter_vars) + url = html.makeuri_contextless( + [ + ("filled_in", "filter"), + ("search", "Search"), + ("view_name", "searchhost" if object_type == "host" else "searchsvc"), + ] + type_filter_vars, + filename="view.py") return html.render_a(span, href=url)
5 years, 5 months
1
0
0
0
GUI CSS: Deployed some more wato styles (CMK-1171)
by Kenneth Okoh
Module: check_mk Branch: master Commit: 9c1212c8551fb952c4ff59fbc9063948e3a9d87d URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9c1212c8551fb9…
Author: Kenneth Okoh <ko(a)mathias-kettner.de> Date: Wed Apr 24 12:30:34 2019 +0200 GUI CSS: Deployed some more wato styles (CMK-1171) Change-Id: Ic937ff4ca9584003593c5ea79f624322023db385 --- web/htdocs/themes/facelift/scss/_main.scss | 49 +- web/htdocs/themes/facelift/scss/_wato.scss | 706 +++++++++++++++-------------- 2 files changed, 380 insertions(+), 375 deletions(-) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=9c1212c855…
5 years, 5 months
1
0
0
0
Start moving config.nodes_of to HostConfig
by Lars Michelsen
Module: check_mk Branch: master Commit: 6adf66aa441b5e0cf82d4bc353b132d5cd97455d URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6adf66aa441b5e…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Mon Apr 22 17:43:17 2019 +0200 Start moving config.nodes_of to HostConfig CMK-2030 Change-Id: Id8d2a947926b2bb31af8816cb0d52400ac3591c1 --- cmk_base/config.py | 14 ++++++++++---- tests/unit/cmk_base/test_config.py | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/cmk_base/config.py b/cmk_base/config.py index 9920e9d..c5103be 100644 --- a/cmk_base/config.py +++ b/cmk_base/config.py @@ -2473,9 +2473,12 @@ class HostConfig(object): self._config_cache = config_cache self.alias = self._get_alias() + self.parents = self._get_parents() + self.is_cluster = self._is_cluster() + # TODO: Rename this to self.clusters? self.part_of_clusters = self._config_cache.clusters_of(hostname) - self.parents = self._get_parents() + self.nodes = self._config_cache.nodes_of(hostname) # TODO: Rename self.tags to self.tag_list and self.tag_groups to self.tags self.tags = self._config_cache.tag_list_of_host(self.hostname) @@ -2556,6 +2559,7 @@ class HostConfig(object): return aliases[0] + # TODO: Move cluster/node parent handling to this function def _get_parents(self): # type: () -> List[str] """Use only those parents which are defined and active in all_hosts""" @@ -3283,12 +3287,14 @@ class ConfigCache(object): self._nodes_of_cache[clustername] = hosts def clusters_of(self, hostname): + # type: (str) -> List[str] """Returns names of cluster hosts the host is a node of""" return self._clusters_of_cache.get(hostname, []) - # TODO: cleanup none - # Returns the nodes of a cluster. Returns None if no match + # TODO: cleanup None case def nodes_of(self, hostname): + # type: (str) -> Optional[List[str]] + """Returns the nodes of a cluster. Returns None if no match""" return self._nodes_of_cache.get(hostname) def all_active_clusters(self): @@ -3331,7 +3337,7 @@ class ConfigCache(object): # 1. New style: explicitly assigned services for cluster, conf in clustered_services_of.iteritems(): - nodes = nodes_of(cluster) + nodes = self.nodes_of(cluster) if not nodes: raise MKGeneralException( "Invalid entry clustered_services_of['%s']: %s is not a cluster." % (cluster, diff --git a/tests/unit/cmk_base/test_config.py b/tests/unit/cmk_base/test_config.py index b0093b5..d1bed27 100644 --- a/tests/unit/cmk_base/test_config.py +++ b/tests/unit/cmk_base/test_config.py @@ -1,4 +1,5 @@ # encoding: utf-8 +# pylint: disable=redefined-outer-name import pytest # type: ignore from testlib.base import Scenario @@ -319,6 +320,39 @@ def test_service_depends_on(monkeypatch): assert config.service_depends_on("test-host", "svc1-abc") == ["dep1", "dep2-abc"] +(a)pytest.fixture() +def cluster_config(monkeypatch): + ts = Scenario().add_host("node1").add_host("host1") + ts.add_cluster("cluster1", nodes=["node1"]) + return ts.apply(monkeypatch) + + +def test_host_config_is_cluster(cluster_config): + assert cluster_config.get_host_config("node1").is_cluster is False + assert cluster_config.get_host_config("host1").is_cluster is False + assert cluster_config.get_host_config("cluster1").is_cluster is True + + +def test_host_config_part_of_clusters(cluster_config): + assert cluster_config.get_host_config("node1").part_of_clusters == ["cluster1"] + assert cluster_config.get_host_config("host1").part_of_clusters == [] + assert cluster_config.get_host_config("cluster1").part_of_clusters == [] + + +def test_host_config_nodes(cluster_config): + assert cluster_config.get_host_config("node1").nodes is None + assert cluster_config.get_host_config("host1").nodes is None + assert cluster_config.get_host_config("cluster1").nodes == ["node1"] + + +def test_host_config_parents(cluster_config): + assert cluster_config.get_host_config("node1").parents == [] + assert cluster_config.get_host_config("host1").parents == [] + # TODO: Move cluster/node parent handling to HostConfig + #assert cluster_config.get_host_config("cluster1").parents == ["node1"] + assert cluster_config.get_host_config("cluster1").parents == [] + + def test_host_tags_default(): assert isinstance(config.host_tags, dict)
5 years, 5 months
1
0
0
0
Cleanup config.nodes_of
by Lars Michelsen
Module: check_mk Branch: master Commit: ea4ff3e83d814225bd375048bd4ef52bdbce0eaa URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ea4ff3e83d8142…
Author: Lars Michelsen <lm(a)mathias-kettner.de> Date: Mon Apr 22 18:11:01 2019 +0200 Cleanup config.nodes_of CMK-2030 Change-Id: I2b0438071e488e5c274246e8e81cb448b3641a8c --- cmk_base/automations/check_mk.py | 5 ++-- cmk_base/check_table.py | 2 +- cmk_base/config.py | 10 +++---- cmk_base/core_config.py | 10 +++++-- cmk_base/core_nagios.py | 8 +++--- cmk_base/data_sources/__init__.py | 2 +- cmk_base/data_sources/host_sections.py | 16 ++++++----- cmk_base/discovery.py | 49 ++++++++++++++++------------------ cmk_base/dump_host.py | 5 ++-- cmk_base/inventory.py | 11 +++++--- cmk_base/modes/check_mk.py | 4 ++- 11 files changed, 66 insertions(+), 56 deletions(-) Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=ea4ff3e83d…
5 years, 5 months
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
60
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Results per page:
10
25
50
100
200