{"id":23137,"library":"os-vif","title":"os-vif","description":"A library for plugging and unplugging virtual interfaces in OpenStack. Current version is 4.3.0, release cadence is aligned with OpenStack releases (approximately every 6 months).","status":"active","version":"4.3.0","language":"python","source_language":"en","source_url":"https://github.com/openstack/os-vif","tags":["openstack","vif","virtual-interface","networking"],"install":[{"cmd":"pip install os-vif","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"Direct import from os_vif is the correct root path.","wrong":"from os_vif.plug import VIFPlugBase","symbol":"VIFPlugBase","correct":"from os_vif import VIFPlugBase"},{"note":"The 'plugin' is an attribute of the os_vif module, not a submodule.","wrong":"import os_vif.plugin","symbol":"plugin","correct":"from os_vif import plugin"}],"quickstart":{"code":"import os_vif\nfrom os_vif import plugin\n\n# Example: initialize os_vif (no args needed)\nos_vif.initialize()\n\n# List loaded plugins\nloaded_plugins = plugin.get_loaded_plugins()\nprint(loaded_plugins)\n\n# Each plugin can plug/unplug a VIF\n# Refer to OpenStack nova or neutron code for full usage","lang":"python","description":"Initialize os-vif and list loaded plugins."},"warnings":[{"fix":"Update your Python environment to >=3.9 and check for deprecated imports.","message":"In version 4.0.0, the 'os_vif' module dropped support for Python 2 and moved to namespace packages. Ensure your project is Python 3.9+.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Always call os_vif.initialize() early in your startup code.","message":"The 'initialize()' function must be called before using any plugins or VIF operations. Forgetting this will cause runtime errors about uninitialized plugins.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure you install the required plugin packages, e.g., 'pip install os-vif-bridge os-vif-ovs'.","message":"os-vif dynamically loads plugins via setuptools entry points. If plugins are not installed (e.g., os-vif-bridge, os-vif-ovs), no plugins will be available. This often confuses users who expect built-in plugins.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install os-vif'.","cause":"The package is not installed.","error":"ModuleNotFoundError: No module named 'os_vif'"},{"fix":"Upgrade to latest version: 'pip install --upgrade os-vif'. Ensure import is 'import os_vif'.","cause":"Using an older version (<2.0.0) where 'initialize' was not present, or importing incorrectly.","error":"AttributeError: module 'os_vif' has no attribute 'initialize'"},{"fix":"Install the corresponding plugin: 'pip install os-vif-bridge'.","cause":"The required plugin package (e.g., os-vif-bridge) is not installed.","error":"os_vif.exception.PluginNotFound: No plugin found for VIF type 'bridge'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}