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:
Eoghan Glynn 2014-12-17 12:57:07 +00:00
parent f3927e17f7
commit 817314e726
2 changed files with 0 additions and 17 deletions

View File

@ -128,11 +128,6 @@ class PollingTask(object):
self.resources[key].get(discovery_cache))
polling_resources = (source_resources or
pollster_resources)
if not polling_resources:
LOG.info(_(
"Skip polling pollster %s, no resources found"),
pollster.name)
continue
try:
samples = list(pollster.obj.get_samples(

View File

@ -670,18 +670,6 @@ class BaseAgentManagerTestCase(base.BaseTestCase):
for c in expected:
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):
self.pipeline_cfg[0]['counters'] = ['test', 'testanother']
self.pipeline_cfg[0]['transformers'] = [