예제 #1
0
    def setUp(self):
        self.addCleanup(mock.patch.stopall)

        self._set_nec_ini()
        self.addCleanup(self._clean_nec_ini)
        super(NecPluginV2TestCase, self).setUp(self._plugin_name)

        self.plugin = manager.NeutronManager.get_plugin()
        self.plugin.ofc = fake_ofc_manager.patch_ofc_manager()
        self.ofc = self.plugin.ofc
        self.callback_nec = nec_plugin.NECPluginV2RPCCallbacks(self.plugin)
        self.context = context.get_admin_context()
예제 #2
0
    def setUp(self, plugin=None, ext_mgr=None):

        self._set_nec_ini()
        plugin = plugin or self._plugin_name
        super(NecPluginV2TestCase, self).setUp(plugin, ext_mgr=ext_mgr)

        self.plugin = manager.NeutronManager.get_plugin()
        self.plugin.ofc = fake_ofc_manager.patch_ofc_manager()
        self.ofc = self.plugin.ofc
        self.callback_nec = nec_plugin.NECPluginV2RPCCallbacks(self.plugin)
        self.context = context.get_admin_context()
        self.net_create_status = 'ACTIVE'
        self.port_create_status = 'DOWN'
예제 #3
0
    def setUp(self):
        self.addCleanup(mock.patch.stopall)

        self._set_nec_ini()
        super(NecPluginV2TestCase, self).setUp(self._plugin_name)
        # NOTE: `test_config' is global, and most tests don't set
        # test_config['config_files'] but read this in setUp().
        # So clean test_config['config_files'] ASAP, to avoid side effects
        # on other tests which are running at the same time.
        self._clean_nec_ini()

        self.plugin = manager.NeutronManager.get_plugin()
        self.plugin.ofc = fake_ofc_manager.patch_ofc_manager()
        self.ofc = self.plugin.ofc
        self.callback_nec = nec_plugin.NECPluginV2RPCCallbacks(self.plugin)
        self.context = context.get_admin_context()