Remove no_resource hack for IPMI pollster
In skip to poll and publish when no resource, no_resource hack is used for IPMI pollsters. Safe to remove it after enabling local node resource for IPMI pollster. Change-Id: I6aecbf86cb57d9b8342d77ca9d16c26d8ace4927
This commit is contained in:
parent
b7426c545c
commit
2be9ea11f0
@ -136,8 +136,7 @@ class PollingTask(object):
|
||||
self.resources[key].get(discovery_cache))
|
||||
polling_resources = (source_resources or
|
||||
pollster_resources)
|
||||
if not polling_resources and not getattr(
|
||||
pollster.obj, 'no_resources', False):
|
||||
if not polling_resources:
|
||||
LOG.info(_("Skip polling pollster %s, no resources"
|
||||
" found"), pollster.name)
|
||||
continue
|
||||
|
@ -28,9 +28,6 @@ CONF.import_opt('host', 'ceilometer.service')
|
||||
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
class _Base(plugin_base.PollsterBase):
|
||||
|
||||
no_resources = True
|
||||
|
||||
def __init__(self):
|
||||
self.nodemanager = node_manager.NodeManager()
|
||||
|
||||
|
@ -29,9 +29,6 @@ class InvalidSensorData(ValueError):
|
||||
|
||||
|
||||
class SensorPollster(plugin_base.PollsterBase):
|
||||
|
||||
no_resources = True
|
||||
|
||||
METRIC = None
|
||||
|
||||
def __init__(self):
|
||||
|
@ -703,15 +703,3 @@ class BaseAgentManagerTestCase(base.BaseTestCase):
|
||||
LOG.info.assert_called_with(
|
||||
'Skip polling pollster %s, no resources found', pollster.name)
|
||||
self.assertEqual(0, get_samples._mock_call_count)
|
||||
|
||||
setattr(pollster.obj, 'no_resources', False)
|
||||
polling_task.poll_and_publish()
|
||||
LOG.info.assert_called_with(
|
||||
'Skip polling pollster %s, no resources found', pollster.name)
|
||||
self.assertEqual(0, get_samples._mock_call_count)
|
||||
|
||||
setattr(pollster.obj, 'no_resources', True)
|
||||
polling_task.poll_and_publish()
|
||||
LOG.info.not_assert_called_with(
|
||||
'Skip polling pollster %s, no resources found', pollster.name)
|
||||
self.assertEqual(1, get_samples._mock_call_count)
|
||||
|
Loading…
Reference in New Issue
Block a user