os-vif 3.1.1__tar.gz → 3.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {os_vif-3.1.1 → os_vif-3.2.0}/.zuul.yaml +0 -12
- {os_vif-3.1.1 → os_vif-3.2.0}/ChangeLog +7 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/PKG-INFO +1 -1
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/functional/internal/command/ip/test_impl_pyroute2.py +7 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif.egg-info/PKG-INFO +1 -1
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif.egg-info/SOURCES.txt +2 -0
- os_vif-3.2.0/os_vif.egg-info/pbr.json +1 -0
- os_vif-3.2.0/releasenotes/notes/default-qos-policy-for-ovs-26f8806046a59c82.yaml +33 -0
- os_vif-3.2.0/releasenotes/source/2023.1.rst +6 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/source/index.rst +1 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_ovs/ovs.py +63 -5
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_ovs/ovsdb/impl_idl.py +2 -1
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_ovs/ovsdb/ovsdb_lib.py +51 -2
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_ovs/tests/functional/base.py +16 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_ovs/tests/functional/ovsdb/test_ovsdb_lib.py +168 -14
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_ovs/tests/functional/test_plugin.py +85 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_ovs/tests/unit/test_plugin.py +17 -6
- os_vif-3.1.1/os_vif.egg-info/pbr.json +0 -1
- {os_vif-3.1.1 → os_vif-3.2.0}/.coveragerc +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/.mailmap +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/.stestr.conf +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/AUTHORS +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/CONTRIBUTING.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/HACKING.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/LICENSE +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/README.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/bindep.txt +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/doc/requirements.txt +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/doc/source/conf.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/doc/source/contributor/contributing.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/doc/source/index.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/doc/source/reference/glossary.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/doc/source/user/host-info.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/doc/source/user/plugins/linux-bridge.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/doc/source/user/plugins/noop.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/doc/source/user/plugins/ovs.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/doc/source/user/usage.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/doc/source/user/vif-types.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/exception.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/i18n.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/internal/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/internal/ip/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/internal/ip/api.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/internal/ip/ip_command.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/internal/ip/linux/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/internal/ip/linux/impl_pyroute2.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/internal/ip/windows/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/internal/ip/windows/impl_netifaces.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/objects/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/objects/base.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/objects/fields.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/objects/fixed_ip.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/objects/host_info.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/objects/instance_info.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/objects/network.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/objects/route.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/objects/subnet.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/objects/vif.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/opts.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/plugin.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/functional/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/functional/base.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/functional/internal/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/functional/internal/command/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/functional/internal/command/ip/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/functional/privsep.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/unit/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/unit/base.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/unit/internal/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/unit/internal/ip/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/unit/internal/ip/linux/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/unit/internal/ip/linux/test_impl_pyroute2.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/unit/internal/ip/test_api.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/unit/internal/ip/windows/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/unit/internal/ip/windows/test_impl_netifaces.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/unit/test_base.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/unit/test_exception.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/unit/test_host_info.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/unit/test_objects.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/unit/test_os_vif.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/unit/test_vif.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/utils.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif/version.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif.egg-info/dependency_links.txt +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif.egg-info/entry_points.txt +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif.egg-info/not-zip-safe +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif.egg-info/requires.txt +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/os_vif.egg-info/top_level.txt +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/playbooks/openstack-tox-functional-ovs-with-sudo/Debian.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/playbooks/openstack-tox-functional-ovs-with-sudo/Gentoo.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/playbooks/openstack-tox-functional-ovs-with-sudo/RedHat.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/playbooks/openstack-tox-functional-ovs-with-sudo/Suse.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/playbooks/openstack-tox-functional-ovs-with-sudo/pre.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/OVSVif-hybrid-unplug-f37bf57bc8e913de.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/add-abstract-ovsdb-api-8f04df58d4ed5b73.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/add-fast-path-vhostuser-support-fe87e558326909b6.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/add-no-op-plugin-763a6703e7328a24.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/add-ovs-representor-portprofile-5f8290e5a40bf0a4.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/add-ovs-vhostuser-support-2ba8de51c1f3a244.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/add-ovsdb-native-322fffb49c91503d.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/always-plug-vifs-for-ovs-1d033fc49a9c6c4e.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/brctl-removal-a5b0e69b865afa57.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/bug-1892132-812e6d5ce0588ebb.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/contextlib-and-nested-with-statements-2747a9ebb9a5bfd7.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/default-to-native-ovsdb-driver-112fb5adf6e19a30.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/do-not-force-mac-ageing-c6e8d750130c5740.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/drop-py36-support-0e9b07073f6ad73f.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/drop-python2-support-7a4bc7d31253c1e5.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/ensure-ovs-bridge-a0c1b51f469c92d0.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/extend-vhostuser-object-fada14a1457d4e56.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/fix-ovs-plugin-describe-049750609559f1ba.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/fix-stevedore-entrypoints-8002ec7a5166c977.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/fix-vif-openvswitch-fa0d19be9dd668e1.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/generic-datapath-offloads-41cabb6842b41533.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/initial-release-2c71d6bbf55f763b.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/oslo-config-opts-entrypoints-e83f907b686d774a.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/per-port-bridge-c6a50179a0256de3.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/port-profile-info-linux-bridge-4800f5a0b7328615.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/port-profile-info-ovs-63b46a3eafc11de2.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/prevent-lb-reply-arp-6459133bfb056069.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/remove_iptools_implementation-2eb866573a680e61.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/revert-always-plug-port-for-ovs-hybrid-plug-false-dc015985cbc5443b.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/vhost-user-mtu-support-cbc7d02a6665fab1.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/notes/vhost-user-reconnect-fa4cbb731b787f71.yaml +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/source/_static/.placeholder +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/source/_templates/.placeholder +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/source/conf.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/source/newton.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/source/ocata.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/source/pike.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/source/queens.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/source/rocky.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/source/stein.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/source/train.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/source/unreleased.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/source/ussuri.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/source/victoria.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/source/wallaby.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/source/xena.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/source/yoga.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/releasenotes/source/zed.rst +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/requirements.txt +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/setup.cfg +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/setup.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/test-requirements.txt +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/tox.ini +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_linux_bridge/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_linux_bridge/constants.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_linux_bridge/iptables.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_linux_bridge/linux_bridge.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_linux_bridge/linux_net.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_linux_bridge/privsep.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_linux_bridge/tests/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_linux_bridge/tests/unit/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_linux_bridge/tests/unit/test_linux_net.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_linux_bridge/tests/unit/test_plugin.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_noop/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_noop/noop.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_noop/tests/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_noop/tests/unit/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_noop/tests/unit/test_plugin.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_ovs/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_ovs/constants.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_ovs/exception.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_ovs/linux_net.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_ovs/ovsdb/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_ovs/ovsdb/api.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_ovs/ovsdb/impl_vsctl.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_ovs/privsep.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_ovs/tests/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_ovs/tests/functional/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_ovs/tests/functional/ovsdb/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_ovs/tests/unit/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_ovs/tests/unit/ovsdb/__init__.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_ovs/tests/unit/ovsdb/test_ovsdb_lib.py +0 -0
- {os_vif-3.1.1 → os_vif-3.2.0}/vif_plug_ovs/tests/unit/test_linux_net.py +0 -0
|
@@ -120,16 +120,6 @@
|
|
|
120
120
|
os_vif_ovs:
|
|
121
121
|
per_port_bridge: true
|
|
122
122
|
|
|
123
|
-
# TODO(gmann): As per the 2023.1 testing runtime, we need to run at least
|
|
124
|
-
# one job on Focal. This job can be removed as per the future testing
|
|
125
|
-
# runtime (whenever we drop the Ubuntu Focal testing).
|
|
126
|
-
- job:
|
|
127
|
-
name: os-vif-ovn-ubuntu-focal
|
|
128
|
-
description: |
|
|
129
|
-
os-vif ovn job (tests hybrid-plug=false) testing on Ubuntu Focal(20.04)
|
|
130
|
-
parent: os-vif-ovn
|
|
131
|
-
nodeset: openstack-single-node-focal
|
|
132
|
-
|
|
133
123
|
- job:
|
|
134
124
|
name: os-vif-linuxbridge
|
|
135
125
|
parent: os-vif-tempest-base
|
|
@@ -182,13 +172,11 @@
|
|
|
182
172
|
voting: false
|
|
183
173
|
- openstack-tox-functional-ovs-with-sudo
|
|
184
174
|
- os-vif-ovn
|
|
185
|
-
- os-vif-ovn-ubuntu-focal
|
|
186
175
|
- os-vif-ovs-iptables
|
|
187
176
|
- os-vif-linuxbridge
|
|
188
177
|
gate:
|
|
189
178
|
jobs:
|
|
190
179
|
- openstack-tox-functional-ovs-with-sudo
|
|
191
180
|
- os-vif-ovn
|
|
192
|
-
- os-vif-ovn-ubuntu-focal
|
|
193
181
|
- os-vif-ovs-iptables
|
|
194
182
|
- os-vif-linuxbridge
|
{os_vif-3.1.1 → os_vif-3.2.0}/os_vif/tests/functional/internal/command/ip/test_impl_pyroute2.py
RENAMED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import os
|
|
14
14
|
import re
|
|
15
|
+
import time
|
|
15
16
|
|
|
16
17
|
from oslo_concurrency import processutils
|
|
17
18
|
from oslo_utils import excutils
|
|
@@ -39,6 +40,12 @@ class ShellIpCommands(object):
|
|
|
39
40
|
'peer', 'name', peer)
|
|
40
41
|
elif 'dummy' == dev_type:
|
|
41
42
|
_execute_command('ip', 'link', 'add', device, 'type', dev_type)
|
|
43
|
+
# ensure that the device exists to prevent racing
|
|
44
|
+
# with other ip commands
|
|
45
|
+
for _ in range(10):
|
|
46
|
+
if self.exist_device(device):
|
|
47
|
+
return
|
|
48
|
+
time.sleep(0.1)
|
|
42
49
|
|
|
43
50
|
def del_device(self, device):
|
|
44
51
|
if self.exist_device(device):
|
|
@@ -97,6 +97,7 @@ releasenotes/notes/always-plug-vifs-for-ovs-1d033fc49a9c6c4e.yaml
|
|
|
97
97
|
releasenotes/notes/brctl-removal-a5b0e69b865afa57.yaml
|
|
98
98
|
releasenotes/notes/bug-1892132-812e6d5ce0588ebb.yaml
|
|
99
99
|
releasenotes/notes/contextlib-and-nested-with-statements-2747a9ebb9a5bfd7.yaml
|
|
100
|
+
releasenotes/notes/default-qos-policy-for-ovs-26f8806046a59c82.yaml
|
|
100
101
|
releasenotes/notes/default-to-native-ovsdb-driver-112fb5adf6e19a30.yaml
|
|
101
102
|
releasenotes/notes/do-not-force-mac-ageing-c6e8d750130c5740.yaml
|
|
102
103
|
releasenotes/notes/drop-py36-support-0e9b07073f6ad73f.yaml
|
|
@@ -117,6 +118,7 @@ releasenotes/notes/remove_iptools_implementation-2eb866573a680e61.yaml
|
|
|
117
118
|
releasenotes/notes/revert-always-plug-port-for-ovs-hybrid-plug-false-dc015985cbc5443b.yaml
|
|
118
119
|
releasenotes/notes/vhost-user-mtu-support-cbc7d02a6665fab1.yaml
|
|
119
120
|
releasenotes/notes/vhost-user-reconnect-fa4cbb731b787f71.yaml
|
|
121
|
+
releasenotes/source/2023.1.rst
|
|
120
122
|
releasenotes/source/conf.py
|
|
121
123
|
releasenotes/source/index.rst
|
|
122
124
|
releasenotes/source/newton.rst
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"git_version": "da742a8", "is_release": true}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
upgrade:
|
|
3
|
+
- |
|
|
4
|
+
A new config option has been added to the OpenvSwitch plugin
|
|
5
|
+
``[os_vif_ovs]default_qos_type``. This option controls
|
|
6
|
+
the Default tc qdisc applied to a kernel interface attached to OpenvSwitch
|
|
7
|
+
on Linux hosts. As of this release, the default tc qdisc is ``linux-noop``
|
|
8
|
+
other supported values are ``linux-htb``, ``linux-hfsc``,
|
|
9
|
+
``linux-sfq``, ``linux-codel`` and ``linux-fq_codel``.
|
|
10
|
+
before this release the default qdisc was undefined. older kernels did not
|
|
11
|
+
apply /proc/sys/net/core/default_qdisc to tap devices. newer kernels such
|
|
12
|
+
as the one found in rhel 9 do. This can significantly impact performance.
|
|
13
|
+
See bug https://bugs.launchpad.net/os-vif/+bug/2017868 for more details.
|
|
14
|
+
The default ``linux-noop`` should perform well for all use-cases so no
|
|
15
|
+
explicit action is required on upgrade however it should be noted that
|
|
16
|
+
the default_qos_type is only set when a port is first created. As such
|
|
17
|
+
this fix will not take effect until the next time the vm interface is
|
|
18
|
+
recreated. If you change this value for an existing port it will only
|
|
19
|
+
take effect after a hard reboot of the VM or a move operation.
|
|
20
|
+
|
|
21
|
+
fixes:
|
|
22
|
+
- |
|
|
23
|
+
A significant performance regression was observed on a subset of Linux
|
|
24
|
+
kernels and sysctl configurations resulting in a reduction of throughput
|
|
25
|
+
to between 10% of the prior performance for small packets and 50% for
|
|
26
|
+
large packets. This has now been resolved by setting a default
|
|
27
|
+
qos_type on ovs interfaces when they are first created. To mimic libvirt's
|
|
28
|
+
undocumented behavior the ``linux-noop`` type is set on the ovs port when
|
|
29
|
+
it is first created. This will be overridden by neutron if a qos policy
|
|
30
|
+
is defined for a port and is simply the initial value to use when first
|
|
31
|
+
adding a port to OpenvSwitch. The default QoS type applied can be
|
|
32
|
+
controlled by the ``[os_vif_ovs]default_qos_type`` config operation.
|
|
33
|
+
See bug https://bugs.launchpad.net/os-vif/+bug/2017868 for more details.
|
|
@@ -102,7 +102,26 @@ class OvsPlugin(plugin.PluginBase):
|
|
|
102
102
|
'bridge. This is experimental and controls the plugging '
|
|
103
103
|
'behavior when not using hybrid-plug.'
|
|
104
104
|
'This is only used on linux and should be set to false '
|
|
105
|
-
'in all other cases such as ironic smartnic ports.')
|
|
105
|
+
'in all other cases such as ironic smartnic ports.'),
|
|
106
|
+
cfg.StrOpt('default_qos_type',
|
|
107
|
+
choices=[
|
|
108
|
+
'linux-htb', 'linux-hfsc', 'linux-sfq', 'linux-codel',
|
|
109
|
+
'linux-fq_codel', 'linux-noop'
|
|
110
|
+
],
|
|
111
|
+
default='linux-noop',
|
|
112
|
+
help="""
|
|
113
|
+
The default qos type to apply to ovs ports.
|
|
114
|
+
linux-noop is the default. ovs will not modify
|
|
115
|
+
the qdisc on the port if linux-noop is specified.
|
|
116
|
+
This allows operators to manage QOS out of band
|
|
117
|
+
of OVS. For more information see the ovs man pages
|
|
118
|
+
https://manpages.debian.org/testing/openvswitch-common/ovs-vswitchd.conf.db.5.en.html#type~4
|
|
119
|
+
|
|
120
|
+
Note: This will only be set when a port is first created
|
|
121
|
+
on the ovs bridge to ensure that the qos type can be
|
|
122
|
+
managed via neutron if required for bandwidth limiting
|
|
123
|
+
and other use-cases.
|
|
124
|
+
"""),
|
|
106
125
|
)
|
|
107
126
|
|
|
108
127
|
def __init__(self, config):
|
|
@@ -159,6 +178,14 @@ class OvsPlugin(plugin.PluginBase):
|
|
|
159
178
|
return vif.network.mtu
|
|
160
179
|
return self.config.network_device_mtu
|
|
161
180
|
|
|
181
|
+
def supports_tc_qdisc(self, vif) -> bool:
|
|
182
|
+
if self._get_vif_datapath_type(vif) != constants.OVS_DATAPATH_SYSTEM:
|
|
183
|
+
return False
|
|
184
|
+
if sys.platform == constants.PLATFORM_WIN32:
|
|
185
|
+
return False
|
|
186
|
+
|
|
187
|
+
return True
|
|
188
|
+
|
|
162
189
|
def _create_vif_port(self, vif, vif_name, instance_info, **kwargs):
|
|
163
190
|
mtu = self._get_mtu(vif)
|
|
164
191
|
# NOTE(sean-k-mooney): As part of a partial fix to bug #1734320
|
|
@@ -175,6 +202,19 @@ class OvsPlugin(plugin.PluginBase):
|
|
|
175
202
|
# can be enabled automatically in the future.
|
|
176
203
|
if self.config.isolate_vif:
|
|
177
204
|
kwargs['tag'] = constants.DEAD_VLAN
|
|
205
|
+
qos_type = self._get_qos_type(vif)
|
|
206
|
+
if qos_type is not None:
|
|
207
|
+
# NOTE(sean-k-mooney): If the port is not already created
|
|
208
|
+
# on the bridge we need to set the default qos type to
|
|
209
|
+
# ensure that the port is created with the correct qos
|
|
210
|
+
# type. This is only needed for the linux kernel datapath
|
|
211
|
+
# as the qos type is not managed by neutron for the other
|
|
212
|
+
# datapaths.
|
|
213
|
+
# This is a mitigation for the performance regression
|
|
214
|
+
# introduced by the fix for bug #1734320. See bug #2017868
|
|
215
|
+
# for more details.
|
|
216
|
+
if not self.ovsdb.port_exists(vif_name, vif.network.bridge):
|
|
217
|
+
kwargs['qos_type'] = qos_type
|
|
178
218
|
bridge = kwargs.pop('bridge', vif.network.bridge)
|
|
179
219
|
self.ovsdb.create_ovs_vif_port(
|
|
180
220
|
bridge,
|
|
@@ -382,9 +422,18 @@ class OvsPlugin(plugin.PluginBase):
|
|
|
382
422
|
|
|
383
423
|
linux_net.delete_bridge(linux_bridge_name, v1_name)
|
|
384
424
|
|
|
385
|
-
self.
|
|
425
|
+
qos_type = self._get_qos_type(vif)
|
|
426
|
+
self.ovsdb.delete_ovs_vif_port(
|
|
427
|
+
vif.network.bridge, v2_name, qos_type=qos_type
|
|
428
|
+
)
|
|
386
429
|
self._delete_bridge_if_trunk(vif)
|
|
387
430
|
|
|
431
|
+
def _get_qos_type(self, vif):
|
|
432
|
+
qos_type = None
|
|
433
|
+
if self.supports_tc_qdisc(vif):
|
|
434
|
+
qos_type = self.config.default_qos_type
|
|
435
|
+
return qos_type
|
|
436
|
+
|
|
388
437
|
def _unplug_vif_windows(self, vif, instance_info):
|
|
389
438
|
"""Remove port from OVS."""
|
|
390
439
|
self.ovsdb.delete_ovs_vif_port(vif.network.bridge, vif.id,
|
|
@@ -400,7 +449,10 @@ class OvsPlugin(plugin.PluginBase):
|
|
|
400
449
|
int_bridge_patch = self.gen_port_name('ibp', vif.id, max_length=64)
|
|
401
450
|
self.ovsdb.delete_ovs_vif_port(vif.network.bridge, int_bridge_patch)
|
|
402
451
|
self.ovsdb.delete_ovs_vif_port(port_bridge_name, port_bridge_patch)
|
|
403
|
-
self.
|
|
452
|
+
qos_type = self._get_qos_type(vif)
|
|
453
|
+
self.ovsdb.delete_ovs_vif_port(
|
|
454
|
+
port_bridge_name, vif.vif_name, qos_type=qos_type
|
|
455
|
+
)
|
|
404
456
|
self.ovsdb.delete_ovs_bridge(port_bridge_name)
|
|
405
457
|
self._delete_bridge_if_trunk(vif)
|
|
406
458
|
|
|
@@ -409,7 +461,10 @@ class OvsPlugin(plugin.PluginBase):
|
|
|
409
461
|
# NOTE(sean-k-mooney): even with the partial revert of change
|
|
410
462
|
# Iaf15fa7a678ec2624f7c12f634269c465fbad930 this should be correct
|
|
411
463
|
# so this is not removed.
|
|
412
|
-
self.
|
|
464
|
+
qos_type = self._get_qos_type(vif)
|
|
465
|
+
self.ovsdb.delete_ovs_vif_port(
|
|
466
|
+
vif.network.bridge, vif.vif_name, qos_type=qos_type
|
|
467
|
+
)
|
|
413
468
|
self._delete_bridge_if_trunk(vif)
|
|
414
469
|
|
|
415
470
|
def _unplug_vf(self, vif):
|
|
@@ -428,8 +483,11 @@ class OvsPlugin(plugin.PluginBase):
|
|
|
428
483
|
# The representor interface can't be deleted because it bind the
|
|
429
484
|
# SR-IOV VF, therefore we just need to remove it from the ovs bridge
|
|
430
485
|
# and set the status to down
|
|
486
|
+
qos_type = self._get_qos_type(vif)
|
|
431
487
|
self.ovsdb.delete_ovs_vif_port(
|
|
432
|
-
vif.network.bridge, representor, delete_netdev=False
|
|
488
|
+
vif.network.bridge, representor, delete_netdev=False,
|
|
489
|
+
qos_type=qos_type
|
|
490
|
+
)
|
|
433
491
|
if datapath == constants.OVS_DATAPATH_SYSTEM:
|
|
434
492
|
linux_net.set_interface_state(representor, 'down')
|
|
435
493
|
self._delete_bridge_if_trunk(vif)
|
|
@@ -23,7 +23,7 @@ from ovsdbapp.schema.open_vswitch import impl_idl
|
|
|
23
23
|
|
|
24
24
|
from vif_plug_ovs.ovsdb import api
|
|
25
25
|
|
|
26
|
-
REQUIRED_TABLES = ('Interface', 'Port', 'Bridge', 'Open_vSwitch')
|
|
26
|
+
REQUIRED_TABLES = ('Interface', 'Port', 'Bridge', 'Open_vSwitch', 'QoS')
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
def idl_factory(config):
|
|
@@ -48,6 +48,7 @@ class NeutronOvsdbIdl(impl_idl.OvsdbIdl, api.ImplAPI):
|
|
|
48
48
|
This class provides an OVSDB IDL (Open vSwitch Database Interface
|
|
49
49
|
Definition Language) interface to the OVS back-end.
|
|
50
50
|
"""
|
|
51
|
+
|
|
51
52
|
def __init__(self, conn):
|
|
52
53
|
vlog.use_python_logger()
|
|
53
54
|
super(NeutronOvsdbIdl, self).__init__(conn)
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
# under the License.
|
|
12
12
|
|
|
13
13
|
import sys
|
|
14
|
+
import uuid
|
|
14
15
|
|
|
15
16
|
from oslo_log import log as logging
|
|
16
17
|
|
|
@@ -20,6 +21,7 @@ from vif_plug_ovs.ovsdb import api as ovsdb_api
|
|
|
20
21
|
|
|
21
22
|
|
|
22
23
|
LOG = logging.getLogger(__name__)
|
|
24
|
+
QOS_UUID_NAMESPACE = uuid.UUID("68da264a-847f-42a8-8ab0-5e774aee3d95")
|
|
23
25
|
|
|
24
26
|
|
|
25
27
|
class BaseOVS(object):
|
|
@@ -142,7 +144,8 @@ class BaseOVS(object):
|
|
|
142
144
|
def create_ovs_vif_port(
|
|
143
145
|
self, bridge, dev, iface_id, mac, instance_id,
|
|
144
146
|
mtu=None, interface_type=None, vhost_server_path=None,
|
|
145
|
-
tag=None, pf_pci=None, vf_num=None, set_ids=True, datapath_type=None
|
|
147
|
+
tag=None, pf_pci=None, vf_num=None, set_ids=True, datapath_type=None,
|
|
148
|
+
qos_type=None
|
|
146
149
|
):
|
|
147
150
|
"""Create OVS port
|
|
148
151
|
|
|
@@ -159,6 +162,7 @@ class BaseOVS(object):
|
|
|
159
162
|
:param vf_num: VF number of PF for dpdk representor port.
|
|
160
163
|
:param set_ids: set external ids on port (bool).
|
|
161
164
|
:param datapath_type: datapath type for port's bridge
|
|
165
|
+
:param qos_type: qos type for a port
|
|
162
166
|
|
|
163
167
|
.. note:: create DPDK representor port by setting all three values:
|
|
164
168
|
`interface_type`, `pf_pci` and `vf_num`. if interface type is
|
|
@@ -181,6 +185,24 @@ class BaseOVS(object):
|
|
|
181
185
|
PF_PCI=pf_pci, VF_NUM=vf_num)
|
|
182
186
|
col_values.append(('options',
|
|
183
187
|
{'dpdk-devargs': devargs_string}))
|
|
188
|
+
# create qos record if qos type is specified
|
|
189
|
+
# and get the qos id. This is done outside of the transaction
|
|
190
|
+
# because we need the qos id to set the qos on the port.
|
|
191
|
+
# The qos uuid cannot be set when creating the record so we
|
|
192
|
+
# have to look it up after the record is created. this means
|
|
193
|
+
# we need to create the qos record outside of the transaction
|
|
194
|
+
# that creates the port.
|
|
195
|
+
qid = None
|
|
196
|
+
if qos_type:
|
|
197
|
+
self.delete_qos_if_exists(dev, qos_type)
|
|
198
|
+
qos_id = uuid.uuid5(QOS_UUID_NAMESPACE, dev)
|
|
199
|
+
qos_external_ids = {'id': str(qos_id), '_type': qos_type}
|
|
200
|
+
self.ovsdb.db_create(
|
|
201
|
+
'QoS', type=qos_type, external_ids=qos_external_ids
|
|
202
|
+
).execute(check_error=True)
|
|
203
|
+
record = self.get_qos(dev, qos_type)
|
|
204
|
+
qid = record[0]['_uuid']
|
|
205
|
+
|
|
184
206
|
with self.ovsdb.transaction() as txn:
|
|
185
207
|
if datapath_type:
|
|
186
208
|
txn.add(self.ovsdb.add_br(bridge, may_exist=True,
|
|
@@ -188,19 +210,46 @@ class BaseOVS(object):
|
|
|
188
210
|
txn.add(self.ovsdb.add_port(bridge, dev))
|
|
189
211
|
if tag:
|
|
190
212
|
txn.add(self.ovsdb.db_set('Port', dev, ('tag', tag)))
|
|
213
|
+
if qid:
|
|
214
|
+
txn.add(self.ovsdb.db_set('Port', dev, ('qos', qid)))
|
|
191
215
|
if col_values:
|
|
192
216
|
txn.add(self.ovsdb.db_set('Interface', dev, *col_values))
|
|
193
217
|
self.update_device_mtu(
|
|
194
218
|
txn, dev, mtu, interface_type=interface_type
|
|
195
219
|
)
|
|
196
220
|
|
|
221
|
+
def port_exists(self, port_name, bridge):
|
|
222
|
+
ports = self.ovsdb.list_ports(bridge).execute()
|
|
223
|
+
return ports is not None and port_name in ports
|
|
224
|
+
|
|
225
|
+
def get_qos(self, dev, qos_type):
|
|
226
|
+
qos_id = uuid.uuid5(QOS_UUID_NAMESPACE, dev)
|
|
227
|
+
external_ids = {'id': str(qos_id), '_type': qos_type}
|
|
228
|
+
return self.ovsdb.db_find(
|
|
229
|
+
'QoS', ('external_ids', '=', external_ids),
|
|
230
|
+
colmuns=['_uuid']
|
|
231
|
+
).execute()
|
|
232
|
+
|
|
233
|
+
def delete_qos_if_exists(self, dev, qos_type):
|
|
234
|
+
qos_ids = self.get_qos(dev, qos_type)
|
|
235
|
+
if qos_ids is not None and len(qos_ids) > 0:
|
|
236
|
+
for qos_id in qos_ids:
|
|
237
|
+
if '_uuid' in qos_id:
|
|
238
|
+
self.ovsdb.db_destroy(
|
|
239
|
+
'QoS', str(qos_id['_uuid'])
|
|
240
|
+
).execute()
|
|
241
|
+
|
|
197
242
|
def update_ovs_vif_port(self, dev, mtu=None, interface_type=None):
|
|
198
243
|
with self.ovsdb.transaction() as txn:
|
|
199
244
|
self.update_device_mtu(
|
|
200
245
|
txn, dev, mtu, interface_type=interface_type
|
|
201
246
|
)
|
|
202
247
|
|
|
203
|
-
def delete_ovs_vif_port(
|
|
248
|
+
def delete_ovs_vif_port(
|
|
249
|
+
self, bridge, dev, delete_netdev=True, qos_type=None
|
|
250
|
+
):
|
|
204
251
|
self.ovsdb.del_port(dev, bridge=bridge, if_exists=True).execute()
|
|
252
|
+
if qos_type:
|
|
253
|
+
self.delete_qos_if_exists(dev, qos_type)
|
|
205
254
|
if delete_netdev:
|
|
206
255
|
linux_net.delete_net_dev(dev)
|
|
@@ -25,6 +25,22 @@ class VifPlugOvsBaseFunctionalTestCase(os_vif_base.BaseFunctionalTestCase):
|
|
|
25
25
|
def _check_bridge(self, name):
|
|
26
26
|
return self._ovsdb.br_exists(name).execute()
|
|
27
27
|
|
|
28
|
+
def _check_port(self, name, bridge):
|
|
29
|
+
return self.ovs.port_exists(name, bridge)
|
|
30
|
+
|
|
31
|
+
def _check_parameter(self, table, port, parameter, expected_value):
|
|
32
|
+
def get_value():
|
|
33
|
+
return self._ovsdb.db_get(table, port, parameter).execute()
|
|
34
|
+
|
|
35
|
+
def check_value():
|
|
36
|
+
val = get_value()
|
|
37
|
+
return val == expected_value
|
|
38
|
+
self.assertTrue(
|
|
39
|
+
wait_until_true(check_value, timeout=2, sleep=0.5),
|
|
40
|
+
f"Parameter {parameter} of {table} {port} is {get_value()} "
|
|
41
|
+
f"not {expected_value}"
|
|
42
|
+
)
|
|
43
|
+
|
|
28
44
|
def _add_bridge(self, name, may_exist=True, datapath_type=None):
|
|
29
45
|
self._ovsdb.add_br(name, may_exist=may_exist,
|
|
30
46
|
datapath_type=datapath_type).execute()
|
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
# License for the specific language governing permissions and limitations
|
|
11
11
|
# under the License.
|
|
12
12
|
|
|
13
|
+
import fixtures
|
|
13
14
|
import random
|
|
14
15
|
|
|
16
|
+
|
|
15
17
|
from unittest import mock
|
|
16
18
|
|
|
17
19
|
import testscenarios
|
|
@@ -19,7 +21,6 @@ import testscenarios
|
|
|
19
21
|
from oslo_concurrency import processutils
|
|
20
22
|
from oslo_config import cfg
|
|
21
23
|
from oslo_utils import uuidutils
|
|
22
|
-
from ovsdbapp.schema.open_vswitch import impl_idl
|
|
23
24
|
|
|
24
25
|
from vif_plug_ovs import constants
|
|
25
26
|
from vif_plug_ovs import linux_net
|
|
@@ -59,17 +60,17 @@ class TestOVSDBLib(testscenarios.WithScenarios,
|
|
|
59
60
|
self.interface)
|
|
60
61
|
|
|
61
62
|
# Make sure exceptions pass through by calling do_post_commit directly
|
|
62
|
-
|
|
63
|
-
impl_idl.
|
|
64
|
-
|
|
63
|
+
post_commit = (
|
|
64
|
+
'ovsdbapp.schema.open_vswitch.impl_idl.'
|
|
65
|
+
'OvsVsctlTransaction.post_commit'
|
|
66
|
+
)
|
|
67
|
+
# "this" is the self parmater which is a reference to the
|
|
68
|
+
# OvsVsctlTransaction instance on which do_post_commit is defiend.
|
|
65
69
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
return (self._ovsdb.db_get(
|
|
69
|
-
table, port, parameter).execute() == expected_value)
|
|
70
|
+
def direct_post_commit(this, transaction):
|
|
71
|
+
this.do_post_commit(transaction)
|
|
70
72
|
|
|
71
|
-
self.
|
|
72
|
-
sleep=0.5))
|
|
73
|
+
self.useFixture(fixtures.MonkeyPatch(post_commit, direct_post_commit))
|
|
73
74
|
|
|
74
75
|
def _add_port(self, bridge, port, may_exist=True):
|
|
75
76
|
with self._ovsdb.transaction() as txn:
|
|
@@ -122,11 +123,11 @@ class TestOVSDBLib(testscenarios.WithScenarios,
|
|
|
122
123
|
expected_external_ids)
|
|
123
124
|
self._check_parameter('Interface', port_name, 'type', interface_type)
|
|
124
125
|
expected_vhost_server_path = {'vhost-server-path': vhost_server_path}
|
|
125
|
-
self._check_parameter(
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
expected_vhost_server_path)
|
|
126
|
+
self._check_parameter(
|
|
127
|
+
'Interface', port_name, 'options', expected_vhost_server_path
|
|
128
|
+
)
|
|
129
129
|
self._check_parameter('Port', port_name, 'tag', 2000)
|
|
130
|
+
self._check_parameter('Port', port_name, 'qos', [])
|
|
130
131
|
|
|
131
132
|
@mock.patch.object(linux_net, 'delete_net_dev')
|
|
132
133
|
def test_delete_ovs_vif_port(self, *mock):
|
|
@@ -180,3 +181,156 @@ class TestOVSDBLib(testscenarios.WithScenarios,
|
|
|
180
181
|
port_opts = {'peer': int_bridge_port}
|
|
181
182
|
self._check_parameter(
|
|
182
183
|
'Interface', port_bridge_port, 'options', port_opts)
|
|
184
|
+
|
|
185
|
+
def test_create_ovs_vif_port_with_default_qos(self):
|
|
186
|
+
port_name = 'qos-port-' + self.interface
|
|
187
|
+
iface_id = 'iface_id'
|
|
188
|
+
mac = 'ca:fe:ca:fe:ca:fe'
|
|
189
|
+
instance_id = uuidutils.generate_uuid()
|
|
190
|
+
mtu = 1500
|
|
191
|
+
interface_type = 'internal'
|
|
192
|
+
qos_type = CONF.os_vif_ovs.default_qos_type
|
|
193
|
+
|
|
194
|
+
self.addCleanup(self._del_bridge, self.brname)
|
|
195
|
+
self._add_bridge(self.brname)
|
|
196
|
+
|
|
197
|
+
self.addCleanup(
|
|
198
|
+
self.ovs.delete_ovs_vif_port, self.brname, port_name,
|
|
199
|
+
delete_netdev=False, qos_type=qos_type
|
|
200
|
+
)
|
|
201
|
+
self.ovs.create_ovs_vif_port(
|
|
202
|
+
self.brname, port_name, iface_id, mac,
|
|
203
|
+
instance_id, mtu=mtu, interface_type=interface_type,
|
|
204
|
+
tag=2000, qos_type=qos_type
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
# first we assert that the standard parameters are set correctly
|
|
208
|
+
expected_external_ids = {'iface-status': 'active',
|
|
209
|
+
'iface-id': iface_id,
|
|
210
|
+
'attached-mac': mac,
|
|
211
|
+
'vm-uuid': instance_id}
|
|
212
|
+
self._check_parameter('Interface', port_name, 'external_ids',
|
|
213
|
+
expected_external_ids)
|
|
214
|
+
self._check_parameter('Interface', port_name, 'type', interface_type)
|
|
215
|
+
self._check_parameter('Port', port_name, 'tag', 2000)
|
|
216
|
+
|
|
217
|
+
# now we check that the port has a qos policy attached
|
|
218
|
+
qos_uuid = self.ovs.get_qos(
|
|
219
|
+
port_name, qos_type
|
|
220
|
+
)[0]['_uuid']
|
|
221
|
+
self._check_parameter('Port', port_name, 'qos', qos_uuid)
|
|
222
|
+
|
|
223
|
+
# finally we check that the qos policy has the correct parameters
|
|
224
|
+
self._check_parameter(
|
|
225
|
+
'QoS', str(qos_uuid), 'type', qos_type
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
def test_delete_qos_if_exists(self):
|
|
229
|
+
port_name = 'del-qos-port-' + self.interface
|
|
230
|
+
iface_id = 'iface_id'
|
|
231
|
+
mac = 'ca:fe:ca:fe:ca:fe'
|
|
232
|
+
instance_id = uuidutils.generate_uuid()
|
|
233
|
+
interface_type = 'internal'
|
|
234
|
+
qos_type = CONF.os_vif_ovs.default_qos_type
|
|
235
|
+
|
|
236
|
+
# setup test by creating a bridge and port, and register
|
|
237
|
+
# cleanup funcitons to avoid leaking them.
|
|
238
|
+
self.addCleanup(self._del_bridge, self.brname)
|
|
239
|
+
self._add_bridge(self.brname)
|
|
240
|
+
self.addCleanup(
|
|
241
|
+
self.ovs.delete_ovs_vif_port, self.brname, port_name,
|
|
242
|
+
delete_netdev=False, qos_type=qos_type
|
|
243
|
+
)
|
|
244
|
+
self.ovs.create_ovs_vif_port(
|
|
245
|
+
self.brname, port_name, iface_id, mac,
|
|
246
|
+
instance_id, interface_type=interface_type,
|
|
247
|
+
qos_type=qos_type
|
|
248
|
+
)
|
|
249
|
+
|
|
250
|
+
# now we check that the port has a qos policy attached
|
|
251
|
+
qos_uuid = self.ovs.get_qos(
|
|
252
|
+
port_name, CONF.os_vif_ovs.default_qos_type
|
|
253
|
+
)[0]['_uuid']
|
|
254
|
+
self._check_parameter('Port', port_name, 'qos', qos_uuid)
|
|
255
|
+
|
|
256
|
+
# finally we check that the qos policy has the correct parameters
|
|
257
|
+
self._check_parameter(
|
|
258
|
+
'QoS', str(qos_uuid), 'type', qos_type
|
|
259
|
+
)
|
|
260
|
+
|
|
261
|
+
# we need to delete the port directly in the db to remove
|
|
262
|
+
# any references to the qos policy
|
|
263
|
+
self.ovs.ovsdb.del_port(
|
|
264
|
+
port_name, bridge=self.brname, if_exists=True).execute()
|
|
265
|
+
# then we can delete the qos policy
|
|
266
|
+
self.ovs.delete_qos_if_exists(port_name, qos_type)
|
|
267
|
+
self._check_parameter(
|
|
268
|
+
'QoS', str(qos_uuid), 'type', None
|
|
269
|
+
)
|
|
270
|
+
# invoking the delete when the policy does not exist
|
|
271
|
+
# should not result in an error
|
|
272
|
+
self.ovs.delete_qos_if_exists(port_name, qos_type)
|
|
273
|
+
self._check_parameter(
|
|
274
|
+
'QoS', str(qos_uuid), 'type', None
|
|
275
|
+
)
|
|
276
|
+
|
|
277
|
+
def test_get_qos(self):
|
|
278
|
+
port_name = 'get-qos-' + self.interface
|
|
279
|
+
iface_id = 'iface_id'
|
|
280
|
+
mac = 'ca:fe:ca:fe:ca:fe'
|
|
281
|
+
instance_id = uuidutils.generate_uuid()
|
|
282
|
+
interface_type = 'internal'
|
|
283
|
+
qos_type = CONF.os_vif_ovs.default_qos_type
|
|
284
|
+
# initally no qos policy should exist
|
|
285
|
+
self.assertEqual(0, len(self.ovs.get_qos(port_name, qos_type)))
|
|
286
|
+
|
|
287
|
+
# if we create a port with a qos policy get_qos should
|
|
288
|
+
# return the policy
|
|
289
|
+
self.addCleanup(self._del_bridge, self.brname)
|
|
290
|
+
self._add_bridge(self.brname)
|
|
291
|
+
self.addCleanup(
|
|
292
|
+
self.ovs.delete_ovs_vif_port, self.brname, port_name,
|
|
293
|
+
delete_netdev=False, qos_type=qos_type
|
|
294
|
+
)
|
|
295
|
+
self.ovs.create_ovs_vif_port(
|
|
296
|
+
self.brname, port_name, iface_id, mac,
|
|
297
|
+
instance_id, interface_type=interface_type,
|
|
298
|
+
qos_type=qos_type
|
|
299
|
+
)
|
|
300
|
+
# result should be a list of lenght 1 containing the
|
|
301
|
+
# qos policy created for the port we defied.
|
|
302
|
+
result = self.ovs.get_qos(port_name, qos_type)
|
|
303
|
+
self.assertEqual(1, len(result))
|
|
304
|
+
self.assertIn('_uuid', result[0])
|
|
305
|
+
self._check_parameter(
|
|
306
|
+
'Port', port_name, 'qos', result[0]['_uuid']
|
|
307
|
+
)
|
|
308
|
+
# if we delete the port and its qos policy get_qos should
|
|
309
|
+
# not return it.
|
|
310
|
+
self.ovs.delete_ovs_vif_port(
|
|
311
|
+
self.brname, port_name,
|
|
312
|
+
delete_netdev=False, qos_type=qos_type
|
|
313
|
+
)
|
|
314
|
+
self.assertEqual(0, len(self.ovs.get_qos(port_name, qos_type)))
|
|
315
|
+
|
|
316
|
+
def test_port_exists(self):
|
|
317
|
+
port_name = 'port-exists-' + self.interface
|
|
318
|
+
iface_id = 'iface_id'
|
|
319
|
+
mac = 'ca:fe:ca:fe:ca:fe'
|
|
320
|
+
instance_id = uuidutils.generate_uuid()
|
|
321
|
+
interface_type = 'internal'
|
|
322
|
+
|
|
323
|
+
self.assertFalse(self.ovs.port_exists(port_name, self.brname))
|
|
324
|
+
|
|
325
|
+
self.addCleanup(self._del_bridge, self.brname)
|
|
326
|
+
self._add_bridge(self.brname)
|
|
327
|
+
self.addCleanup(
|
|
328
|
+
self.ovs.delete_ovs_vif_port, self.brname, port_name,
|
|
329
|
+
delete_netdev=False,
|
|
330
|
+
)
|
|
331
|
+
self.ovs.create_ovs_vif_port(
|
|
332
|
+
self.brname, port_name, iface_id, mac,
|
|
333
|
+
instance_id, interface_type=interface_type,
|
|
334
|
+
)
|
|
335
|
+
|
|
336
|
+
self.assertTrue(self.ovs.port_exists(port_name, self.brname))
|