Ejemplo n.º 1
0
 def __init__(self):
     super(MeoPlugin, self).__init__()
     self._pool = eventlet.GreenPool()
     self._vim_drivers = driver_manager.DriverManager(
         'apmec.meo.vim.drivers',
         cfg.CONF.meo_vim.vim_drivers)
     self.vim_client = vim_client.VimClient()
Ejemplo n.º 2
0
 def __init__(self):
     super(MEMPlugin, self).__init__()
     self._pool = eventlet.GreenPool()
     self.boot_wait = cfg.CONF.apmec.boot_wait
     self.vim_client = vim_client.VimClient()
     self._mea_manager = driver_manager.DriverManager(
         'apmec.apmec.mem.drivers', cfg.CONF.apmec.infra_driver)
     self._mea_action = driver_manager.DriverManager(
         'apmec.apmec.policy.actions', cfg.CONF.apmec.policy_action)
     self._mea_monitor = monitor.MEAMonitor(self.boot_wait)
     self._mea_alarm_monitor = monitor.MEAAlarmMonitor()
Ejemplo n.º 3
0
 def test_get_vim_without_defined_default_vim(self):
     vimclient = vim_client.VimClient()
     service_plugins = mock.Mock()
     meo_plugin = mock.Mock()
     meo_plugin.get_default_vim.side_effect = \
         orm_exc.NoResultFound()
     service_plugins.get.return_value = meo_plugin
     with mock.patch.object(manager.ApmecManager,
                            'get_service_plugins',
                            return_value=service_plugins):
         self.assertRaises(meo.VimDefaultNotDefined, vimclient.get_vim,
                           None)
Ejemplo n.º 4
0
 def _fetch_vim(vim_uuid):
     vim_res = vim_client.VimClient().get_vim(context, vim_uuid)
     return vim_res