예제 #1
0
 def test_load_normal_plugins(self):
     mgr = manager.AgentManager(0, self.conf, namespaces=['ipmi'])
     # 8 pollsters for Node Manager
     self.assertEqual(12, len(mgr.extensions))
예제 #2
0
 def test_load_plugins(self):
     mgr = manager.AgentManager(0, self.conf)
     self.assertIsNotNone(list(mgr.extensions))
예제 #3
0
 def create_manager(self):
     return manager.AgentManager(0, self.CONF)
예제 #4
0
 def test_import_error_in_plugin(self, LOG):
     namespaces = ['ipmi']
     manager.AgentManager(0, self.conf, namespaces=namespaces)
     LOG.warning.assert_called_with(
         'No valid pollsters can be loaded from %s namespaces', namespaces)
예제 #5
0
 def setUp(self):
     super(TestVolumeBackupSizePollster, self).setUp()
     conf = service.prepare_service([], [])
     self.manager = manager.AgentManager(0, conf)
     self.pollster = cinder.VolumeBackupSize(conf)
예제 #6
0
def create_polling_service(worker_id, conf=None):
    if conf is None:
        conf = _prepare_config()
        conf.log_opt_values(LOG, log.DEBUG)
    return manager.AgentManager(worker_id,
                                conf)