Revert "Skip to poll and publish when no resources found"
We revert commit 934a90d4c61ff66f99e5a46480047dec355b5d61 as it doesn't take into account that pollsters may have no expectation of an explicit resource list, such as in the IPMI case. Change-Id: Ib9579417cd0654b790cc0b3c111b06e4dcecf728 Closes-Bug: #1403280
This commit is contained in:
parent
f3927e17f7
commit
817314e726
@ -128,11 +128,6 @@ class PollingTask(object):
|
|||||||
self.resources[key].get(discovery_cache))
|
self.resources[key].get(discovery_cache))
|
||||||
polling_resources = (source_resources or
|
polling_resources = (source_resources or
|
||||||
pollster_resources)
|
pollster_resources)
|
||||||
if not polling_resources:
|
|
||||||
LOG.info(_(
|
|
||||||
"Skip polling pollster %s, no resources found"),
|
|
||||||
pollster.name)
|
|
||||||
continue
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
samples = list(pollster.obj.get_samples(
|
samples = list(pollster.obj.get_samples(
|
||||||
|
@ -670,18 +670,6 @@ class BaseAgentManagerTestCase(base.BaseTestCase):
|
|||||||
for c in expected:
|
for c in expected:
|
||||||
self.assertIn(c, p_coord.extract_my_subset.call_args_list)
|
self.assertIn(c, p_coord.extract_my_subset.call_args_list)
|
||||||
|
|
||||||
def test_skip_polling_and_publish_with_no_resources(self):
|
|
||||||
self.pipeline_cfg[0]['resources'] = []
|
|
||||||
self.setup_pipeline()
|
|
||||||
polling_task = self.mgr.setup_polling_tasks().values()[0]
|
|
||||||
pollster = list(polling_task.pollster_matches['test_pipeline'])[0]
|
|
||||||
LOG = mock.MagicMock()
|
|
||||||
with mock.patch('ceilometer.agent.base.LOG', LOG):
|
|
||||||
polling_task.poll_and_publish()
|
|
||||||
if not self.mgr.discover():
|
|
||||||
LOG.info.assert_called_with('Skip polling pollster %s, no '
|
|
||||||
'resources found', pollster.name)
|
|
||||||
|
|
||||||
def test_arithmetic_transformer(self):
|
def test_arithmetic_transformer(self):
|
||||||
self.pipeline_cfg[0]['counters'] = ['test', 'testanother']
|
self.pipeline_cfg[0]['counters'] = ['test', 'testanother']
|
||||||
self.pipeline_cfg[0]['transformers'] = [
|
self.pipeline_cfg[0]['transformers'] = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user