

def setUp(self, core_plugin=None, dm_plugin=None, ext_mgr=None):
    if (dm_plugin is None):
        dm_plugin = DB_DM_PLUGIN_KLASS
    service_plugins = {
        'dm_plugin_name': dm_plugin,
    }
    cfg.CONF.set_override('api_extensions_path', device_manager_test_support.extensions_path)
    cfg.CONF.set_default('allow_overlapping_ips', True)
    hdm_db.HostingDeviceManagerMixin.supported_extension_aliases = [ciscohostingdevicemanager.HOSTING_DEVICE_MANAGER_ALIAS]
    super(TestDeviceManagerDBPlugin, self).setUp(plugin=core_plugin, service_plugins=service_plugins, ext_mgr=ext_mgr)
    cfg.CONF.set_override('policy_file', policy_path, 'oslo_policy')
    if (not ext_mgr):
        self.plugin = importutils.import_object(dm_plugin)
        ext_mgr = api_ext.PluginAwareExtensionManager(device_manager_test_support.extensions_path, {
            c_constants.DEVICE_MANAGER: self.plugin,
        })
        app = config.load_paste_app('extensions_test_app')
        self.ext_api = api_ext.ExtensionMiddleware(app, ext_mgr=ext_mgr)
    self._mock_l3_admin_tenant()
    self._create_mgmt_nw_for_tests(self.fmt)
    self._devmgr = NeutronManager.get_service_plugins()[c_constants.DEVICE_MANAGER]
    self._devmgr._svc_vm_mgr_obj = service_vm_lib.ServiceVMManager(True, None, None, None, '', keystone_session=mock.MagicMock())
    self._mock_svc_vm_create_delete(service_plugins._devmgr)
    self._other_tenant_id = device_manager_test_support._uuid()
    self._devmgr._core_plugin = NeutronManager.get_plugin()

dataset/ETHPy150Open openstack/networking-cisco/networking_cisco/tests/unit/cisco/device_manager/test_db_device_manager.py TestDeviceManagerDBPlugin.setUp/VarMisuse@249/417 `self`->`service_plugins`