def setUp(self): super(TestDFL3RouterPlugin, self).setUp() self.l3p = directory.get_plugin('L3_ROUTER_NAT') self.nb_api = self.l3p.nb_api self.nb_api.get().unique_key = 5 self.nb_api.get().topic = 'topic' self.ext_api = test_extensions.setup_extensions_middleware( test_l3.L3TestExtensionManager())
def setUp(self): self.addCleanup(self._cleanup) test_db_base_plugin_v2.NeutronDbPluginV2TestCase.quota_db_driver = ( 'neutron.db.quota.driver.DbQuotaDriver') super(TestL3ResourcesEventHandler, self).setUp() self.useFixture(fixture.APIDefinitionFixture()) ext_mgr = test_l3.L3TestExtensionManager() self.ext_api = test_extensions.setup_extensions_middleware(ext_mgr) quota.QUOTAS._driver = None
def setUp(self, **kwargs): super().setUp(**kwargs) self.chassis = self.add_fake_chassis('ovs-host1', enable_chassis_as_gw=True) self.l3_plugin = directory.get_plugin(plugin_constants.L3) ext_mgr = test_l3.L3TestExtensionManager() self.ext_api = test_extensions.setup_extensions_middleware(ext_mgr) self.handler = event.RowEventHandler() self.sb_api.idl.notify = self.handler.notify
def setup_parent(self): """Perform parent setup with the common plugin configuration class.""" ext_mgr = test_l3.L3TestExtensionManager() # Ensure that the parent setup can be called without arguments # by the common configuration setUp. parent_setup = functools.partial( super(test_plugin.Ml2PluginV2TestCase, self).setUp, plugin=test_plugin.PLUGIN_NAME, ext_mgr=ext_mgr, service_plugins={'l3_plugin_name': self.l3_plugin}, ) self.useFixture(test_plugin.Ml2ConfFixture(parent_setup))
def setUp(self): if 'v6' in self._testMethodName: self.skipTest("NVSD Plugin does not support IPV6.") def mocked_oneconvergence_init(self): def side_effect(*args, **kwargs): return {'id': str(uuid.uuid4())} self.nvsdlib = mock.Mock() self.nvsdlib.create_network.side_effect = side_effect ext_mgr = test_l3.L3TestExtensionManager() with mock.patch.object(nvsd_plugin.OneConvergencePluginV2, 'oneconvergence_init', new=mocked_oneconvergence_init): super(TestOneConvergenceL3NatTestCase, self).setUp(plugin=self._plugin_name, ext_mgr=ext_mgr)
def setUp(self): plugin = 'neutron.tests.unit.extensions.test_l3.TestNoL3NatPlugin' l3_plugin = ('networking_ovn.l3.l3_ovn.OVNL3RouterPlugin') service_plugins = {'l3_plugin_name': l3_plugin} # For these tests we need to enable overlapping ips cfg.CONF.set_default('allow_overlapping_ips', True) ext_mgr = test_l3.L3TestExtensionManager() impl_idl_ovn.OvsdbNbOvnIdl = mock.Mock() super(OVNL3BaseForTests, self).setUp(plugin=plugin, ext_mgr=ext_mgr, service_plugins=service_plugins) mgr = manager.NeutronManager.get_instance() self.plugin = mgr.get_service_plugins().get( service_constants.L3_ROUTER_NAT) patcher = mock.patch('networking_ovn.l3.l3_ovn.OVNL3RouterPlugin._ovn', new_callable=mock.PropertyMock, return_value=fakes.FakeOvsdbNbOvnIdl()) patcher.start() self.setup_notification_driver()
def setUp(self, core_plugin=None, l3_plugin=None, ext_mgr=None): if not core_plugin: core_plugin = CORE_PLUGIN_CLASS if not l3_plugin: l3_plugin = L3_PLUGIN_CLASS service_plugins = {'l3_plugin_name': l3_plugin} self._mock('eventlet.greenthread.sleep') self._mock( 'networking_brocade.vyatta.vrouter.driver.' 'VyattaVRouterDriver', FakeVRouterDriver) cfg.CONF.set_default('allow_overlapping_ips', True) cfg.CONF.set_override('tenant_id', 'tenant_a', 'VROUTER') super(VRouterTestCase, self).setUp(plugin=core_plugin, service_plugins=service_plugins, ext_mgr=test_l3_plugin.L3TestExtensionManager()) self.setup_notification_driver()
def setUp(self): ext_mgr = test_l3.L3TestExtensionManager() super(TestBigSwitchML2Router, self).setUp(ext_mgr=ext_mgr) self.ext_api = test_extensions.setup_extensions_middleware(ext_mgr)
def setUp(self): super(TestL3ResourcesEventHandler, self).setUp() self.useFixture(tools.AttributeMapMemento()) ext_mgr = test_l3.L3TestExtensionManager() self.ext_api = test_extensions.setup_extensions_middleware(ext_mgr)
def setUp(self): super(TestL3ResourcesEventHandler, self).setUp() ext_mgr = test_l3.L3TestExtensionManager() self.ext_api = test_extensions.setup_extensions_middleware(ext_mgr)
def setUp(self): ext_mgr = test_l3.L3TestExtensionManager() super(TestMidonetRouterML2, self).setUp(ext_mgr=ext_mgr) self.ext_api = test_extensions.setup_extensions_middleware(ext_mgr)
def setUp(self): super(TestL3ResourcesEventHandler, self).setUp() self.useFixture(fixture.APIDefinitionFixture()) ext_mgr = test_l3.L3TestExtensionManager() self.ext_api = test_extensions.setup_extensions_middleware(ext_mgr)