Merge "Removed unused method in compute agent manger"
This commit is contained in:
commit
a6ff1e8203
@ -75,19 +75,6 @@ class AgentManager(agent.AgentManager):
|
||||
def create_polling_task(self):
|
||||
return PollingTask(self)
|
||||
|
||||
def setup_notifier_task(self):
|
||||
"""For nova notifier usage."""
|
||||
task = PollingTask(self)
|
||||
for pollster in self.pollster_manager.extensions:
|
||||
task.add(
|
||||
pollster,
|
||||
self.pipeline_manager.pipelines)
|
||||
self.notifier_task = task
|
||||
|
||||
def poll_instance(self, context, instance):
|
||||
"""Poll one instance."""
|
||||
self.notifier_task.poll_and_publish_instances([instance])
|
||||
|
||||
@property
|
||||
def inspector(self):
|
||||
return self._inspector
|
||||
|
@ -66,13 +66,6 @@ class TestRunTasks(agentbase.BaseAgentManagerTestCase):
|
||||
'instance_get_all_by_host',
|
||||
side_effect=lambda *x: [self.instance, stillborn_instance]))
|
||||
|
||||
def test_notifier_task(self):
|
||||
self.mgr.setup_notifier_task()
|
||||
self.mgr.poll_instance(None, self.instance)
|
||||
self.assertEqual(len(self.Pollster.samples), 1)
|
||||
pub = self.mgr.pipeline_manager.pipelines[0].publishers[0]
|
||||
self.assertEqual(pub.samples[0], self.Pollster.test_data)
|
||||
|
||||
def test_setup_polling_tasks(self):
|
||||
super(TestRunTasks, self).test_setup_polling_tasks()
|
||||
self.assertTrue(self.Pollster.samples[0][1] is self.instance)
|
||||
|
Loading…
Reference in New Issue
Block a user