def setUp(self): super(TestVNFMonitor, self).setUp() p = mock.patch('tacker.common.driver_manager.DriverManager') self.mock_monitor_manager = p.start() mock.patch('tacker.db.common_services.common_services_db.' 'CommonServicesPluginDb.create_event').start() self._cos_db_plugin = common_services_db.CommonServicesPluginDb() self.addCleanup(p.stop)
def _log_monitor_events(context, vnf_dict, evt_details): _cos_db_plg = common_services_db.CommonServicesPluginDb() _cos_db_plg.create_event(context, res_id=vnf_dict['id'], res_type=constants.RES_TYPE_VNF, res_state=vnf_dict['status'], evt_type=constants.RES_EVT_MONITOR, tstamp=timeutils.utcnow(), details=evt_details)
def setUp(self): super(TestNfvoPlugin, self).setUp() self.addCleanup(mock.patch.stopall) self.context = context.get_admin_context() self._mock_driver_manager() mock.patch('tacker.nfvo.nfvo_plugin.NfvoPlugin.__run__').start() self.nfvo_plugin = nfvo_plugin.NfvoPlugin() mock.patch('tacker.db.common_services.common_services_db.' 'CommonServicesPluginDb.create_event').start() self._cos_db_plugin = common_services_db.CommonServicesPluginDb()
def setUp(self): super(TestVNFMPlugin, self).setUp() self.addCleanup(mock.patch.stopall) self.context = context.get_admin_context() self._mock_vim_client() self._stub_get_vim() self._mock_device_manager() self._mock_vnf_monitor() self._mock_green_pool() self._insert_dummy_vim() self.vnfm_plugin = plugin.VNFMPlugin() mock.patch('tacker.db.common_services.common_services_db.' 'CommonServicesPluginDb.create_event').start() self._cos_db_plugin = common_services_db.CommonServicesPluginDb()
def setUp(self): super(TestCommonServicesPlugin, self).setUp() self.addCleanup(mock.patch.stopall) self.context = context.get_admin_context() self.event_db_plugin = common_services_db.CommonServicesPluginDb() self.coreutil_plugin = common_services_plugin.CommonServicesPlugin()
def __init__(self): super(VNFMPluginDb, self).__init__() self._cos_db_plg = common_services_db.CommonServicesPluginDb()