os-vif 3.7.0__tar.gz → 4.0.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.
Files changed (187) hide show
  1. {os_vif-3.7.0 → os_vif-4.0.0}/AUTHORS +1 -0
  2. {os_vif-3.7.0 → os_vif-4.0.0}/ChangeLog +9 -0
  3. {os_vif-3.7.0 → os_vif-4.0.0}/PKG-INFO +3 -3
  4. os_vif-4.0.0/os_vif/internal/ip/api.py +19 -0
  5. os_vif-4.0.0/os_vif/tests/unit/internal/ip/test_api.py +21 -0
  6. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif.egg-info/PKG-INFO +3 -3
  7. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif.egg-info/SOURCES.txt +3 -4
  8. os_vif-4.0.0/os_vif.egg-info/pbr.json +1 -0
  9. os_vif-4.0.0/releasenotes/notes/remove-py38-e0701b3363079bbf.yaml +5 -0
  10. os_vif-4.0.0/releasenotes/notes/remove-windows-23df1c587d505d72.yaml +4 -0
  11. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/source/2023.1.rst +1 -1
  12. os_vif-4.0.0/releasenotes/source/2024.2.rst +6 -0
  13. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/source/index.rst +1 -0
  14. {os_vif-3.7.0 → os_vif-4.0.0}/setup.cfg +2 -2
  15. {os_vif-3.7.0 → os_vif-4.0.0}/tox.ini +2 -0
  16. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_ovs/constants.py +0 -3
  17. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_ovs/linux_net.py +1 -8
  18. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_ovs/ovs.py +2 -37
  19. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_ovs/ovsdb/ovsdb_lib.py +1 -7
  20. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_ovs/tests/functional/base.py +8 -1
  21. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_ovs/tests/functional/ovsdb/test_ovsdb_lib.py +5 -0
  22. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_ovs/tests/unit/ovsdb/test_ovsdb_lib.py +1 -11
  23. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_ovs/tests/unit/test_plugin.py +6 -63
  24. os_vif-3.7.0/os_vif/internal/ip/api.py +0 -30
  25. os_vif-3.7.0/os_vif/internal/ip/windows/impl_netifaces.py +0 -47
  26. os_vif-3.7.0/os_vif/tests/unit/internal/ip/test_api.py +0 -39
  27. os_vif-3.7.0/os_vif/tests/unit/internal/ip/windows/test_impl_netifaces.py +0 -46
  28. os_vif-3.7.0/os_vif.egg-info/pbr.json +0 -1
  29. os_vif-3.7.0/vif_plug_ovs/tests/unit/__init__.py +0 -0
  30. os_vif-3.7.0/vif_plug_ovs/tests/unit/ovsdb/__init__.py +0 -0
  31. {os_vif-3.7.0 → os_vif-4.0.0}/.coveragerc +0 -0
  32. {os_vif-3.7.0 → os_vif-4.0.0}/.mailmap +0 -0
  33. {os_vif-3.7.0 → os_vif-4.0.0}/.stestr.conf +0 -0
  34. {os_vif-3.7.0 → os_vif-4.0.0}/.zuul.yaml +0 -0
  35. {os_vif-3.7.0 → os_vif-4.0.0}/CONTRIBUTING.rst +0 -0
  36. {os_vif-3.7.0 → os_vif-4.0.0}/HACKING.rst +0 -0
  37. {os_vif-3.7.0 → os_vif-4.0.0}/LICENSE +0 -0
  38. {os_vif-3.7.0 → os_vif-4.0.0}/README.rst +0 -0
  39. {os_vif-3.7.0 → os_vif-4.0.0}/bindep.txt +0 -0
  40. {os_vif-3.7.0 → os_vif-4.0.0}/doc/requirements.txt +0 -0
  41. {os_vif-3.7.0 → os_vif-4.0.0}/doc/source/conf.py +0 -0
  42. {os_vif-3.7.0 → os_vif-4.0.0}/doc/source/contributor/contributing.rst +0 -0
  43. {os_vif-3.7.0 → os_vif-4.0.0}/doc/source/index.rst +0 -0
  44. {os_vif-3.7.0 → os_vif-4.0.0}/doc/source/reference/glossary.rst +0 -0
  45. {os_vif-3.7.0 → os_vif-4.0.0}/doc/source/user/host-info.rst +0 -0
  46. {os_vif-3.7.0 → os_vif-4.0.0}/doc/source/user/plugins/linux-bridge.rst +0 -0
  47. {os_vif-3.7.0 → os_vif-4.0.0}/doc/source/user/plugins/noop.rst +0 -0
  48. {os_vif-3.7.0 → os_vif-4.0.0}/doc/source/user/plugins/ovs.rst +0 -0
  49. {os_vif-3.7.0 → os_vif-4.0.0}/doc/source/user/usage.rst +0 -0
  50. {os_vif-3.7.0 → os_vif-4.0.0}/doc/source/user/vif-types.rst +0 -0
  51. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/__init__.py +0 -0
  52. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/exception.py +0 -0
  53. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/i18n.py +0 -0
  54. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/internal/__init__.py +0 -0
  55. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/internal/ip/__init__.py +0 -0
  56. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/internal/ip/ip_command.py +0 -0
  57. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/internal/ip/linux/__init__.py +0 -0
  58. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/internal/ip/linux/impl_pyroute2.py +0 -0
  59. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/objects/__init__.py +0 -0
  60. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/objects/base.py +0 -0
  61. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/objects/fields.py +0 -0
  62. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/objects/fixed_ip.py +0 -0
  63. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/objects/host_info.py +0 -0
  64. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/objects/instance_info.py +0 -0
  65. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/objects/network.py +0 -0
  66. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/objects/route.py +0 -0
  67. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/objects/subnet.py +0 -0
  68. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/objects/vif.py +0 -0
  69. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/opts.py +0 -0
  70. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/plugin.py +0 -0
  71. {os_vif-3.7.0/os_vif/internal/ip/windows → os_vif-4.0.0/os_vif/tests}/__init__.py +0 -0
  72. {os_vif-3.7.0/os_vif/tests → os_vif-4.0.0/os_vif/tests/functional}/__init__.py +0 -0
  73. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/tests/functional/base.py +0 -0
  74. {os_vif-3.7.0/os_vif/tests/functional → os_vif-4.0.0/os_vif/tests/functional/internal}/__init__.py +0 -0
  75. {os_vif-3.7.0/os_vif/tests/functional/internal → os_vif-4.0.0/os_vif/tests/functional/internal/command}/__init__.py +0 -0
  76. {os_vif-3.7.0/os_vif/tests/functional/internal/command → os_vif-4.0.0/os_vif/tests/functional/internal/command/ip}/__init__.py +0 -0
  77. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/tests/functional/internal/command/ip/test_impl_pyroute2.py +0 -0
  78. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/tests/functional/privsep.py +0 -0
  79. {os_vif-3.7.0/os_vif/tests/functional/internal/command/ip → os_vif-4.0.0/os_vif/tests/unit}/__init__.py +0 -0
  80. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/tests/unit/base.py +0 -0
  81. {os_vif-3.7.0/os_vif/tests/unit → os_vif-4.0.0/os_vif/tests/unit/internal}/__init__.py +0 -0
  82. {os_vif-3.7.0/os_vif/tests/unit/internal → os_vif-4.0.0/os_vif/tests/unit/internal/ip}/__init__.py +0 -0
  83. {os_vif-3.7.0/os_vif/tests/unit/internal/ip → os_vif-4.0.0/os_vif/tests/unit/internal/ip/linux}/__init__.py +0 -0
  84. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/tests/unit/internal/ip/linux/test_impl_pyroute2.py +0 -0
  85. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/tests/unit/test_base.py +0 -0
  86. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/tests/unit/test_exception.py +0 -0
  87. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/tests/unit/test_host_info.py +0 -0
  88. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/tests/unit/test_objects.py +0 -0
  89. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/tests/unit/test_os_vif.py +0 -0
  90. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/tests/unit/test_vif.py +0 -0
  91. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/utils.py +0 -0
  92. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif/version.py +0 -0
  93. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif.egg-info/dependency_links.txt +0 -0
  94. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif.egg-info/entry_points.txt +0 -0
  95. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif.egg-info/not-zip-safe +0 -0
  96. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif.egg-info/requires.txt +0 -0
  97. {os_vif-3.7.0 → os_vif-4.0.0}/os_vif.egg-info/top_level.txt +0 -0
  98. {os_vif-3.7.0 → os_vif-4.0.0}/playbooks/openstack-tox-functional-ovs-with-sudo/Debian.yaml +0 -0
  99. {os_vif-3.7.0 → os_vif-4.0.0}/playbooks/openstack-tox-functional-ovs-with-sudo/Gentoo.yaml +0 -0
  100. {os_vif-3.7.0 → os_vif-4.0.0}/playbooks/openstack-tox-functional-ovs-with-sudo/RedHat.yaml +0 -0
  101. {os_vif-3.7.0 → os_vif-4.0.0}/playbooks/openstack-tox-functional-ovs-with-sudo/Suse.yaml +0 -0
  102. {os_vif-3.7.0 → os_vif-4.0.0}/playbooks/openstack-tox-functional-ovs-with-sudo/pre.yaml +0 -0
  103. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/OVSVif-hybrid-unplug-f37bf57bc8e913de.yaml +0 -0
  104. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/add-abstract-ovsdb-api-8f04df58d4ed5b73.yaml +0 -0
  105. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/add-fast-path-vhostuser-support-fe87e558326909b6.yaml +0 -0
  106. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/add-no-op-plugin-763a6703e7328a24.yaml +0 -0
  107. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/add-ovs-representor-portprofile-5f8290e5a40bf0a4.yaml +0 -0
  108. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/add-ovs-vhostuser-support-2ba8de51c1f3a244.yaml +0 -0
  109. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/add-ovsdb-native-322fffb49c91503d.yaml +0 -0
  110. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/always-plug-vifs-for-ovs-1d033fc49a9c6c4e.yaml +0 -0
  111. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/brctl-removal-a5b0e69b865afa57.yaml +0 -0
  112. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/bug-1892132-812e6d5ce0588ebb.yaml +0 -0
  113. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/contextlib-and-nested-with-statements-2747a9ebb9a5bfd7.yaml +0 -0
  114. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/default-qos-policy-for-ovs-26f8806046a59c82.yaml +0 -0
  115. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/default-to-native-ovsdb-driver-112fb5adf6e19a30.yaml +0 -0
  116. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/deprecate-windows-support-49f5ca1b1a1f4d66.yaml +0 -0
  117. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/do-not-force-mac-ageing-c6e8d750130c5740.yaml +0 -0
  118. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/drop-py36-support-0e9b07073f6ad73f.yaml +0 -0
  119. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/drop-python2-support-7a4bc7d31253c1e5.yaml +0 -0
  120. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/ensure-ovs-bridge-a0c1b51f469c92d0.yaml +0 -0
  121. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/extend-vhostuser-object-fada14a1457d4e56.yaml +0 -0
  122. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/fix-broken-dataplane-on-nova-restart-with-isolate_vif-71617a41741b33e8.yaml +0 -0
  123. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/fix-ovs-plugin-describe-049750609559f1ba.yaml +0 -0
  124. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/fix-stevedore-entrypoints-8002ec7a5166c977.yaml +0 -0
  125. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/fix-vif-openvswitch-fa0d19be9dd668e1.yaml +0 -0
  126. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/generic-datapath-offloads-41cabb6842b41533.yaml +0 -0
  127. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/initial-release-2c71d6bbf55f763b.yaml +0 -0
  128. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/oslo-config-opts-entrypoints-e83f907b686d774a.yaml +0 -0
  129. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/per-port-bridge-c6a50179a0256de3.yaml +0 -0
  130. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/port-profile-info-linux-bridge-4800f5a0b7328615.yaml +0 -0
  131. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/port-profile-info-ovs-63b46a3eafc11de2.yaml +0 -0
  132. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/prevent-lb-reply-arp-6459133bfb056069.yaml +0 -0
  133. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/remove_iptools_implementation-2eb866573a680e61.yaml +0 -0
  134. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/revert-always-plug-port-for-ovs-hybrid-plug-false-dc015985cbc5443b.yaml +0 -0
  135. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/vhost-user-mtu-support-cbc7d02a6665fab1.yaml +0 -0
  136. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/notes/vhost-user-reconnect-fa4cbb731b787f71.yaml +0 -0
  137. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/source/2023.2.rst +0 -0
  138. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/source/2024.1.rst +0 -0
  139. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/source/_static/.placeholder +0 -0
  140. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/source/_templates/.placeholder +0 -0
  141. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/source/conf.py +0 -0
  142. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/source/newton.rst +0 -0
  143. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/source/ocata.rst +0 -0
  144. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/source/pike.rst +0 -0
  145. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/source/queens.rst +0 -0
  146. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/source/rocky.rst +0 -0
  147. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/source/stein.rst +0 -0
  148. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/source/train.rst +0 -0
  149. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/source/unreleased.rst +0 -0
  150. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/source/ussuri.rst +0 -0
  151. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/source/victoria.rst +0 -0
  152. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/source/wallaby.rst +0 -0
  153. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/source/xena.rst +0 -0
  154. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/source/yoga.rst +0 -0
  155. {os_vif-3.7.0 → os_vif-4.0.0}/releasenotes/source/zed.rst +0 -0
  156. {os_vif-3.7.0 → os_vif-4.0.0}/requirements.txt +0 -0
  157. {os_vif-3.7.0 → os_vif-4.0.0}/setup.py +0 -0
  158. {os_vif-3.7.0 → os_vif-4.0.0}/test-requirements.txt +0 -0
  159. {os_vif-3.7.0/os_vif/tests/unit/internal/ip/linux → os_vif-4.0.0/vif_plug_linux_bridge}/__init__.py +0 -0
  160. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_linux_bridge/constants.py +0 -0
  161. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_linux_bridge/iptables.py +0 -0
  162. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_linux_bridge/linux_bridge.py +0 -0
  163. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_linux_bridge/linux_net.py +0 -0
  164. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_linux_bridge/privsep.py +0 -0
  165. {os_vif-3.7.0/os_vif/tests/unit/internal/ip/windows → os_vif-4.0.0/vif_plug_linux_bridge/tests}/__init__.py +0 -0
  166. {os_vif-3.7.0/vif_plug_linux_bridge → os_vif-4.0.0/vif_plug_linux_bridge/tests/unit}/__init__.py +0 -0
  167. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_linux_bridge/tests/unit/test_linux_net.py +0 -0
  168. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_linux_bridge/tests/unit/test_plugin.py +0 -0
  169. {os_vif-3.7.0/vif_plug_linux_bridge/tests → os_vif-4.0.0/vif_plug_noop}/__init__.py +0 -0
  170. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_noop/noop.py +0 -0
  171. {os_vif-3.7.0/vif_plug_linux_bridge/tests/unit → os_vif-4.0.0/vif_plug_noop/tests}/__init__.py +0 -0
  172. {os_vif-3.7.0/vif_plug_noop → os_vif-4.0.0/vif_plug_noop/tests/unit}/__init__.py +0 -0
  173. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_noop/tests/unit/test_plugin.py +0 -0
  174. {os_vif-3.7.0/vif_plug_noop/tests → os_vif-4.0.0/vif_plug_ovs}/__init__.py +0 -0
  175. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_ovs/exception.py +0 -0
  176. {os_vif-3.7.0/vif_plug_noop/tests/unit → os_vif-4.0.0/vif_plug_ovs/ovsdb}/__init__.py +0 -0
  177. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_ovs/ovsdb/api.py +0 -0
  178. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_ovs/ovsdb/impl_idl.py +0 -0
  179. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_ovs/ovsdb/impl_vsctl.py +0 -0
  180. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_ovs/privsep.py +0 -0
  181. {os_vif-3.7.0/vif_plug_ovs → os_vif-4.0.0/vif_plug_ovs/tests}/__init__.py +0 -0
  182. {os_vif-3.7.0/vif_plug_ovs/ovsdb → os_vif-4.0.0/vif_plug_ovs/tests/functional}/__init__.py +0 -0
  183. {os_vif-3.7.0/vif_plug_ovs/tests → os_vif-4.0.0/vif_plug_ovs/tests/functional/ovsdb}/__init__.py +0 -0
  184. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_ovs/tests/functional/test_plugin.py +0 -0
  185. {os_vif-3.7.0/vif_plug_ovs/tests/functional → os_vif-4.0.0/vif_plug_ovs/tests/unit}/__init__.py +0 -0
  186. {os_vif-3.7.0/vif_plug_ovs/tests/functional → os_vif-4.0.0/vif_plug_ovs/tests/unit}/ovsdb/__init__.py +0 -0
  187. {os_vif-3.7.0 → os_vif-4.0.0}/vif_plug_ovs/tests/unit/test_linux_net.py +0 -0
@@ -47,6 +47,7 @@ Sahid Orentino Ferdjaoui <sahid.ferdjaoui@redhat.com>
47
47
  Sean Dague <sean@dague.net>
48
48
  Sean M. Collins <sean@coreitpro.com>
49
49
  Sean Mooney <sean.k.mooney@intel.com>
50
+ Sean Mooney <sean@seanmooney.info>
50
51
  Sean Mooney <work@seanmooney.info>
51
52
  Sergey Belous <sbelous@mirantis.com>
52
53
  Spencer Yu <yushb@gohighsec.com>
@@ -1,6 +1,15 @@
1
1
  CHANGES
2
2
  =======
3
3
 
4
+ 4.0.0
5
+ -----
6
+
7
+ * Clean up Windows support
8
+ * address test stablity under load
9
+ * reno: Update master for unmaintained/2023.1
10
+ * Remove Python 3.8 support
11
+ * Update master for stable/2024.2
12
+
4
13
  3.7.0
5
14
  -----
6
15
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.2
2
2
  Name: os_vif
3
- Version: 3.7.0
3
+ Version: 4.0.0
4
4
  Summary: A library for plugging and unplugging virtual interfaces in OpenStack.
5
5
  Home-page: https://docs.openstack.org/os-vif/latest/
6
6
  Author: OpenStack
@@ -45,9 +45,9 @@ Classifier: Operating System :: POSIX :: Linux
45
45
  Classifier: Programming Language :: Python
46
46
  Classifier: Programming Language :: Python :: 3
47
47
  Classifier: Programming Language :: Python :: 3 :: Only
48
- Classifier: Programming Language :: Python :: 3.8
49
48
  Classifier: Programming Language :: Python :: 3.9
50
49
  Classifier: Programming Language :: Python :: 3.10
51
50
  Classifier: Programming Language :: Python :: 3.11
51
+ Classifier: Programming Language :: Python :: 3.12
52
52
  Classifier: Programming Language :: Python :: Implementation :: CPython
53
- Requires-Python: >=3.8
53
+ Requires-Python: >=3.9
@@ -0,0 +1,19 @@
1
+ # Licensed under the Apache License, Version 2.0 (the "License"); you may
2
+ # not use this file except in compliance with the License. You may obtain
3
+ # a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10
+ # License for the specific language governing permissions and limitations
11
+ # under the License.
12
+
13
+ from oslo_log import log as logging
14
+
15
+ from os_vif.internal.ip.linux.impl_pyroute2 import PyRoute2
16
+
17
+ LOG = logging.getLogger(__name__)
18
+
19
+ ip = PyRoute2()
@@ -0,0 +1,21 @@
1
+ # Licensed under the Apache License, Version 2.0 (the "License"); you may
2
+ # not use this file except in compliance with the License. You may obtain
3
+ # a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10
+ # License for the specific language governing permissions and limitations
11
+ # under the License.
12
+
13
+ from os_vif.internal.ip import api
14
+ from os_vif.internal.ip.linux import impl_pyroute2
15
+ from os_vif.tests.unit import base
16
+
17
+
18
+ class TestIpApi(base.TestCase):
19
+
20
+ def test_get_impl(self):
21
+ self.assertIsInstance(api.ip, impl_pyroute2.PyRoute2)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.2
2
2
  Name: os-vif
3
- Version: 3.7.0
3
+ Version: 4.0.0
4
4
  Summary: A library for plugging and unplugging virtual interfaces in OpenStack.
5
5
  Home-page: https://docs.openstack.org/os-vif/latest/
6
6
  Author: OpenStack
@@ -45,9 +45,9 @@ Classifier: Operating System :: POSIX :: Linux
45
45
  Classifier: Programming Language :: Python
46
46
  Classifier: Programming Language :: Python :: 3
47
47
  Classifier: Programming Language :: Python :: 3 :: Only
48
- Classifier: Programming Language :: Python :: 3.8
49
48
  Classifier: Programming Language :: Python :: 3.9
50
49
  Classifier: Programming Language :: Python :: 3.10
51
50
  Classifier: Programming Language :: Python :: 3.11
51
+ Classifier: Programming Language :: Python :: 3.12
52
52
  Classifier: Programming Language :: Python :: Implementation :: CPython
53
- Requires-Python: >=3.8
53
+ Requires-Python: >=3.9
@@ -46,8 +46,6 @@ os_vif/internal/ip/api.py
46
46
  os_vif/internal/ip/ip_command.py
47
47
  os_vif/internal/ip/linux/__init__.py
48
48
  os_vif/internal/ip/linux/impl_pyroute2.py
49
- os_vif/internal/ip/windows/__init__.py
50
- os_vif/internal/ip/windows/impl_netifaces.py
51
49
  os_vif/objects/__init__.py
52
50
  os_vif/objects/base.py
53
51
  os_vif/objects/fields.py
@@ -79,8 +77,6 @@ os_vif/tests/unit/internal/ip/__init__.py
79
77
  os_vif/tests/unit/internal/ip/test_api.py
80
78
  os_vif/tests/unit/internal/ip/linux/__init__.py
81
79
  os_vif/tests/unit/internal/ip/linux/test_impl_pyroute2.py
82
- os_vif/tests/unit/internal/ip/windows/__init__.py
83
- os_vif/tests/unit/internal/ip/windows/test_impl_netifaces.py
84
80
  playbooks/openstack-tox-functional-ovs-with-sudo/Debian.yaml
85
81
  playbooks/openstack-tox-functional-ovs-with-sudo/Gentoo.yaml
86
82
  playbooks/openstack-tox-functional-ovs-with-sudo/RedHat.yaml
@@ -116,6 +112,8 @@ releasenotes/notes/per-port-bridge-c6a50179a0256de3.yaml
116
112
  releasenotes/notes/port-profile-info-linux-bridge-4800f5a0b7328615.yaml
117
113
  releasenotes/notes/port-profile-info-ovs-63b46a3eafc11de2.yaml
118
114
  releasenotes/notes/prevent-lb-reply-arp-6459133bfb056069.yaml
115
+ releasenotes/notes/remove-py38-e0701b3363079bbf.yaml
116
+ releasenotes/notes/remove-windows-23df1c587d505d72.yaml
119
117
  releasenotes/notes/remove_iptools_implementation-2eb866573a680e61.yaml
120
118
  releasenotes/notes/revert-always-plug-port-for-ovs-hybrid-plug-false-dc015985cbc5443b.yaml
121
119
  releasenotes/notes/vhost-user-mtu-support-cbc7d02a6665fab1.yaml
@@ -123,6 +121,7 @@ releasenotes/notes/vhost-user-reconnect-fa4cbb731b787f71.yaml
123
121
  releasenotes/source/2023.1.rst
124
122
  releasenotes/source/2023.2.rst
125
123
  releasenotes/source/2024.1.rst
124
+ releasenotes/source/2024.2.rst
126
125
  releasenotes/source/conf.py
127
126
  releasenotes/source/index.rst
128
127
  releasenotes/source/newton.rst
@@ -0,0 +1 @@
1
+ {"git_version": "7152159", "is_release": true}
@@ -0,0 +1,5 @@
1
+ ---
2
+ upgrade:
3
+ - |
4
+ Support for Python 3.8 has been removed. Now the minimum python version
5
+ supported is 3.9 .
@@ -0,0 +1,4 @@
1
+ ---
2
+ upgrade:
3
+ - |
4
+ This library no longer supports Windows Operating Systems.
@@ -3,4 +3,4 @@
3
3
  ===========================
4
4
 
5
5
  .. release-notes::
6
- :branch: stable/2023.1
6
+ :branch: unmaintained/2023.1
@@ -0,0 +1,6 @@
1
+ ===========================
2
+ 2024.2 Series Release Notes
3
+ ===========================
4
+
5
+ .. release-notes::
6
+ :branch: stable/2024.2
@@ -6,6 +6,7 @@ Release Notes
6
6
  :maxdepth: 1
7
7
 
8
8
  unreleased
9
+ 2024.2
9
10
  2024.1
10
11
  2023.2
11
12
  2023.1
@@ -5,7 +5,7 @@ description_file = README.rst
5
5
  author = OpenStack
6
6
  author_email = openstack-discuss@lists.openstack.org
7
7
  home_page = https://docs.openstack.org/os-vif/latest/
8
- python_requires = >=3.8
8
+ python_requires = >=3.9
9
9
  classifier =
10
10
  Environment :: OpenStack
11
11
  Intended Audience :: Information Technology
@@ -15,10 +15,10 @@ classifier =
15
15
  Programming Language :: Python
16
16
  Programming Language :: Python :: 3
17
17
  Programming Language :: Python :: 3 :: Only
18
- Programming Language :: Python :: 3.8
19
18
  Programming Language :: Python :: 3.9
20
19
  Programming Language :: Python :: 3.10
21
20
  Programming Language :: Python :: 3.11
21
+ Programming Language :: Python :: 3.12
22
22
  Programming Language :: Python :: Implementation :: CPython
23
23
 
24
24
  [files]
@@ -5,6 +5,8 @@ envlist = py3,pep8,docs,releasenotes,cover
5
5
  [testenv]
6
6
  usedevelop = True
7
7
  setenv =
8
+ passenv =
9
+ OS_VIF_CHECK_PARAMETER_TIMEOUT
8
10
  deps =
9
11
  -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
10
12
  -r{toxinidir}/requirements.txt
@@ -19,9 +19,6 @@ OVS_VHOSTUSER_PREFIX = 'vhu'
19
19
  OVS_DATAPATH_SYSTEM = 'system'
20
20
  OVS_DATAPATH_NETDEV = 'netdev'
21
21
 
22
- PLATFORM_LINUX = 'linux2'
23
- PLATFORM_WIN32 = 'win32'
24
-
25
22
  OVS_DPDK_INTERFACE_TYPE = 'dpdk'
26
23
 
27
24
  # Neutron dead VLAN.
@@ -22,14 +22,12 @@
22
22
  import glob
23
23
  import os
24
24
  import re
25
- import sys
26
25
 
27
26
  from os_vif.internal.ip.api import ip as ip_lib
28
27
  from oslo_concurrency import processutils
29
28
  from oslo_log import log as logging
30
29
  from oslo_utils import excutils
31
30
 
32
- from vif_plug_ovs import constants
33
31
  from vif_plug_ovs import exception
34
32
  from vif_plug_ovs import privsep
35
33
 
@@ -55,12 +53,7 @@ NIC_NAME_LEN = 14
55
53
  def _update_device_mtu(dev, mtu):
56
54
  if not mtu:
57
55
  return
58
- if sys.platform != constants.PLATFORM_WIN32:
59
- # Hyper-V with OVS does not support external programming of
60
- # virtual interface MTUs via netsh or other Windows tools.
61
- # When plugging an interface on Windows, we therefore skip
62
- # programming the MTU and fallback to DHCP advertisement.
63
- set_device_mtu(dev, mtu)
56
+ set_device_mtu(dev, mtu)
64
57
 
65
58
 
66
59
  @privsep.vif_plug.entrypoint
@@ -17,8 +17,6 @@
17
17
  # License for the specific language governing permissions and limitations
18
18
  # under the License.
19
19
 
20
- import sys
21
-
22
20
  from oslo_config import cfg
23
21
  from oslo_log import log as logging
24
22
 
@@ -27,7 +25,6 @@ from os_vif.internal.ip.api import ip as ip_lib
27
25
  from os_vif import objects
28
26
  from os_vif import plugin
29
27
 
30
-
31
28
  from vif_plug_ovs import constants
32
29
  from vif_plug_ovs import exception
33
30
  from vif_plug_ovs import linux_net
@@ -181,9 +178,6 @@ class OvsPlugin(plugin.PluginBase):
181
178
  def supports_tc_qdisc(self, vif) -> bool:
182
179
  if self._get_vif_datapath_type(vif) != constants.OVS_DATAPATH_SYSTEM:
183
180
  return False
184
- if sys.platform == constants.PLATFORM_WIN32:
185
- return False
186
-
187
181
  return True
188
182
 
189
183
  def _isolate_vif(self, vif_name, bridge):
@@ -283,14 +277,6 @@ class OvsPlugin(plugin.PluginBase):
283
277
  linux_net.update_veth_pair(v1_name, v2_name, mtu)
284
278
  self._update_vif_port(vif, v2_name)
285
279
 
286
- def _plug_vif_windows(self, vif, instance_info):
287
- """Create a per-VIF OVS port."""
288
-
289
- if not ip_lib.exists(vif.id):
290
- self.ovsdb.ensure_ovs_bridge(vif.network.bridge,
291
- self._get_vif_datapath_type(vif))
292
- self._create_vif_port(vif, vif.id, instance_info)
293
-
294
280
  def _plug_port_bridge(self, vif, instance_info):
295
281
  """Create a per-VIF OVS bridge and patch pair."""
296
282
 
@@ -381,15 +367,7 @@ class OvsPlugin(plugin.PluginBase):
381
367
  raise exception.WrongPortProfile(
382
368
  profile=vif.port_profile.__class__.__name__)
383
369
 
384
- if sys.platform == constants.PLATFORM_WIN32:
385
- if type(vif) not in (
386
- objects.vif.VIFOpenVSwitch, objects.vif.VIFBridge
387
- ):
388
- raise osv_exception.PlugException(
389
- vif=vif, err="This vif type is not supported on Windows")
390
-
391
- self._plug_vif_windows(vif, instance_info)
392
- elif isinstance(vif, objects.vif.VIFOpenVSwitch):
370
+ if isinstance(vif, objects.vif.VIFOpenVSwitch):
393
371
  if self.config.per_port_bridge:
394
372
  self._plug_port_bridge(vif, instance_info)
395
373
  else:
@@ -443,12 +421,6 @@ class OvsPlugin(plugin.PluginBase):
443
421
  qos_type = self.config.default_qos_type
444
422
  return qos_type
445
423
 
446
- def _unplug_vif_windows(self, vif, instance_info):
447
- """Remove port from OVS."""
448
- self.ovsdb.delete_ovs_vif_port(vif.network.bridge, vif.id,
449
- delete_netdev=False)
450
- self._delete_bridge_if_trunk(vif)
451
-
452
424
  def _unplug_port_bridge(self, vif, instance_info):
453
425
  """Create a per-VIF OVS bridge and patch pair."""
454
426
  # NOTE(sean-k-mooney): the port name prefix should not be
@@ -508,14 +480,7 @@ class OvsPlugin(plugin.PluginBase):
508
480
  objects.vif.VIFPortProfileOpenVSwitch):
509
481
  raise exception.WrongPortProfile(
510
482
  profile=vif.port_profile.__class__.__name__)
511
- if sys.platform == constants.PLATFORM_WIN32:
512
- if type(vif) not in (
513
- objects.vif.VIFOpenVSwitch, objects.vif.VIFBridge
514
- ):
515
- raise osv_exception.UnplugException(
516
- vif=vif, err="This vif type is not supported on windows.")
517
- self._unplug_vif_windows(vif, instance_info)
518
- elif isinstance(vif, objects.vif.VIFOpenVSwitch):
483
+ if isinstance(vif, objects.vif.VIFOpenVSwitch):
519
484
  if self.config.per_port_bridge:
520
485
  self._unplug_port_bridge(vif, instance_info)
521
486
  else:
@@ -10,7 +10,6 @@
10
10
  # License for the specific language governing permissions and limitations
11
11
  # under the License.
12
12
 
13
- import sys
14
13
  import uuid
15
14
 
16
15
  from oslo_log import log as logging
@@ -59,12 +58,7 @@ class BaseOVS(object):
59
58
  if interface_type not in [
60
59
  constants.OVS_VHOSTUSER_INTERFACE_TYPE,
61
60
  constants.OVS_VHOSTUSER_CLIENT_INTERFACE_TYPE]:
62
- if sys.platform != constants.PLATFORM_WIN32:
63
- # Hyper-V with OVS does not support external programming of
64
- # virtual interface MTUs via netsh or other Windows tools.
65
- # When plugging an interface on Windows, we therefore skip
66
- # programming the MTU and fallback to DHCP advertisement.
67
- linux_net.set_device_mtu(dev, mtu)
61
+ linux_net.set_device_mtu(dev, mtu)
68
62
  elif self._ovs_supports_mtu_requests():
69
63
  self._set_mtu_request(txn, dev, mtu)
70
64
  else:
@@ -9,6 +9,8 @@
9
9
  # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10
10
  # License for the specific language governing permissions and limitations
11
11
  # under the License.
12
+ import functools
13
+ import os
12
14
 
13
15
  from os_vif.tests.functional import base as os_vif_base
14
16
 
@@ -28,6 +30,10 @@ class VifPlugOvsBaseFunctionalTestCase(os_vif_base.BaseFunctionalTestCase):
28
30
  def _check_port(self, name, bridge):
29
31
  return self.ovs.port_exists(name, bridge)
30
32
 
33
+ @functools.cache
34
+ def _get_timeout(self):
35
+ return int(os.environ.get('OS_VIF_CHECK_PARAMETER_TIMEOUT', '10'))
36
+
31
37
  def _check_parameter(self, table, port, parameter, expected_value):
32
38
  def get_value():
33
39
  return self._ovsdb.db_get(table, port, parameter).execute()
@@ -36,7 +42,8 @@ class VifPlugOvsBaseFunctionalTestCase(os_vif_base.BaseFunctionalTestCase):
36
42
  val = get_value()
37
43
  return val == expected_value
38
44
  self.assertTrue(
39
- wait_until_true(check_value, timeout=2, sleep=0.5),
45
+ wait_until_true(
46
+ check_value, timeout=self._get_timeout(), sleep=0.5),
40
47
  f"Parameter {parameter} of {table} {port} is {get_value()} "
41
48
  f"not {expected_value}"
42
49
  )
@@ -183,6 +183,11 @@ class TestOVSDBLib(testscenarios.WithScenarios,
183
183
  'Interface', port_bridge_port, 'options', port_opts)
184
184
 
185
185
  def test_create_ovs_vif_port_with_default_qos(self):
186
+ if self.interface == 'native':
187
+ self.skipTest(
188
+ 'test_create_ovs_vif_port_with_default_qos is unstable '
189
+ 'when run with the native driver, see: '
190
+ 'https://bugs.launchpad.net/os-vif/+bug/2087982')
186
191
  port_name = 'qos-port-' + self.interface
187
192
  iface_id = 'iface_id'
188
193
  mac = 'ca:fe:ca:fe:ca:fe'
@@ -53,24 +53,14 @@ class BaseOVSTest(testtools.TestCase):
53
53
  calls = [mock.call('Interface', 'device', ('mtu_request', 1500))]
54
54
  self.mock_db_set.assert_has_calls(calls)
55
55
 
56
- @mock.patch('sys.platform', constants.PLATFORM_LINUX)
57
56
  @mock.patch.object(linux_net, 'set_device_mtu')
58
- def test__update_device_mtu_interface_not_vhostuser_linux(self,
57
+ def test__update_device_mtu_interface_not_vhostuser(self,
59
58
  mock_set_device_mtu):
60
59
  self.br.update_device_mtu(
61
60
  self.mock_transaction, 'device', 1500, 'not_vhost'
62
61
  )
63
62
  mock_set_device_mtu.assert_has_calls([mock.call('device', 1500)])
64
63
 
65
- @mock.patch('sys.platform', constants.PLATFORM_WIN32)
66
- @mock.patch.object(linux_net, 'set_device_mtu')
67
- def test__update_device_mtu_interface_not_vhostuser_windows(self,
68
- mock_set_device_mtu):
69
- self.br.update_device_mtu(
70
- self.mock_transaction, 'device', 1500, 'not_vhost'
71
- )
72
- mock_set_device_mtu.assert_not_called()
73
-
74
64
  def test__update_device_mtu_interface_vhostuser_supports_mtu_req(self):
75
65
  with mock.patch.object(self.br, '_ovs_supports_mtu_requests',
76
66
  return_value=True), \
@@ -238,20 +238,16 @@ class PluginTest(testtools.TestCase):
238
238
  mtu=plugin.config.network_device_mtu,
239
239
  interface_type=constants.OVS_VHOSTUSER_INTERFACE_TYPE)
240
240
 
241
- @mock.patch.object(ovs, 'sys')
242
241
  @mock.patch.object(ovs.OvsPlugin, '_plug_vif_generic')
243
- def test_plug_ovs_port_bridge_false(self, plug_vif_generic, mock_sys):
244
- mock_sys.platform = 'linux'
242
+ def test_plug_ovs_port_bridge_false(self, plug_vif_generic):
245
243
  plugin = ovs.OvsPlugin.load(constants.PLUGIN_NAME)
246
244
  with mock.patch.object(plugin.config, 'per_port_bridge', False):
247
245
  plugin.plug(self.vif_ovs, self.instance)
248
246
  plug_vif_generic.assert_called_once_with(
249
247
  self.vif_ovs, self.instance)
250
248
 
251
- @mock.patch.object(ovs, 'sys')
252
249
  @mock.patch.object(ovs.OvsPlugin, '_plug_port_bridge')
253
- def test_plug_ovs_port_bridge_true(self, plug_vif, mock_sys):
254
- mock_sys.platform = 'linux'
250
+ def test_plug_ovs_port_bridge_true(self, plug_vif):
255
251
  plugin = ovs.OvsPlugin.load(constants.PLUGIN_NAME)
256
252
  with mock.patch.object(plugin.config, 'per_port_bridge', True):
257
253
  plugin.plug(self.vif_ovs, self.instance)
@@ -276,8 +272,7 @@ class PluginTest(testtools.TestCase):
276
272
  @mock.patch.object(linux_net, 'create_veth_pair')
277
273
  @mock.patch.object(ip_lib, 'exists')
278
274
  @mock.patch.object(linux_net, 'ensure_bridge')
279
- @mock.patch.object(ovs, 'sys')
280
- def test_plug_ovs_bridge(self, mock_sys, ensure_bridge, device_exists,
275
+ def test_plug_ovs_bridge(self, ensure_bridge, device_exists,
281
276
  create_veth_pair, update_veth_pair,
282
277
  add_bridge_port, _create_vif_port,
283
278
  _update_vif_port, ensure_ovs_bridge,
@@ -307,7 +302,6 @@ class PluginTest(testtools.TestCase):
307
302
  # plugging new devices should result in devices being created
308
303
 
309
304
  device_exists.return_value = False
310
- mock_sys.platform = 'linux'
311
305
  plugin = ovs.OvsPlugin.load(constants.PLUGIN_NAME)
312
306
  plugin.plug(self.vif_ovs_hybrid, self.instance)
313
307
  ensure_bridge.assert_has_calls(calls['ensure_bridge'])
@@ -333,38 +327,10 @@ class PluginTest(testtools.TestCase):
333
327
  update_veth_pair.assert_has_calls(calls['update_veth_pair'])
334
328
  _update_vif_port.assert_has_calls(calls['_update_vif_port'])
335
329
 
336
- @mock.patch.object(ovsdb_lib.BaseOVS, 'ensure_ovs_bridge')
337
- @mock.patch.object(ovs.OvsPlugin, '_create_vif_port')
338
- @mock.patch.object(ip_lib, 'exists', return_value=False)
339
- @mock.patch.object(ovs, 'sys')
340
- def _check_plug_ovs_windows(self, vif, mock_sys, mock_exists,
341
- _create_vif_port, ensure_ovs_bridge):
342
- dp_type = ovs.OvsPlugin._get_vif_datapath_type(vif)
343
- calls = {
344
- 'exists': [mock.call(vif.id)],
345
- '_create_vif_port': [mock.call(vif, vif.id, self.instance)],
346
- 'ensure_ovs_bridge': [mock.call('br0', dp_type)]
347
- }
348
-
349
- mock_sys.platform = constants.PLATFORM_WIN32
350
- plugin = ovs.OvsPlugin.load(constants.PLUGIN_NAME)
351
- plugin.plug(vif, self.instance)
352
- mock_exists.assert_has_calls(calls['exists'])
353
- _create_vif_port.assert_has_calls(calls['_create_vif_port'])
354
- ensure_ovs_bridge.assert_has_calls(calls['ensure_ovs_bridge'])
355
-
356
- def test_plug_ovs_windows(self):
357
- self._check_plug_ovs_windows(self.vif_ovs)
358
-
359
- def test_plug_ovs_bridge_windows(self):
360
- self._check_plug_ovs_windows(self.vif_ovs_hybrid)
361
-
362
330
  @mock.patch.object(ovsdb_lib.BaseOVS, 'delete_ovs_bridge')
363
- @mock.patch.object(ovs, 'sys')
364
331
  @mock.patch.object(ovs.OvsPlugin, '_unplug_vif_generic')
365
- def test_unplug_ovs_port_bridge_false(self, unplug, mock_sys,
332
+ def test_unplug_ovs_port_bridge_false(self, unplug,
366
333
  delete_ovs_bridge):
367
- mock_sys.platform = 'linux'
368
334
  plugin = ovs.OvsPlugin.load(constants.PLUGIN_NAME)
369
335
  with mock.patch.object(plugin.config, 'per_port_bridge', False):
370
336
  plugin.unplug(self.vif_ovs, self.instance)
@@ -372,11 +338,9 @@ class PluginTest(testtools.TestCase):
372
338
  delete_ovs_bridge.assert_not_called()
373
339
 
374
340
  @mock.patch.object(ovsdb_lib.BaseOVS, 'delete_ovs_bridge')
375
- @mock.patch.object(ovs, 'sys')
376
341
  @mock.patch.object(ovs.OvsPlugin, '_unplug_port_bridge')
377
- def test_unplug_ovs_port_bridge_true(self, unplug, mock_sys,
342
+ def test_unplug_ovs_port_bridge_true(self, unplug,
378
343
  delete_ovs_bridge):
379
- mock_sys.platform = 'linux'
380
344
  plugin = ovs.OvsPlugin.load(constants.PLUGIN_NAME)
381
345
  with mock.patch.object(plugin.config, 'per_port_bridge', True):
382
346
  plugin.unplug(self.vif_ovs, self.instance)
@@ -394,8 +358,7 @@ class PluginTest(testtools.TestCase):
394
358
  @mock.patch.object(ovsdb_lib.BaseOVS, 'delete_ovs_bridge')
395
359
  @mock.patch.object(ovsdb_lib.BaseOVS, 'delete_ovs_vif_port')
396
360
  @mock.patch.object(linux_net, 'delete_bridge')
397
- @mock.patch.object(ovs, 'sys')
398
- def test_unplug_ovs_bridge(self, mock_sys, delete_bridge,
361
+ def test_unplug_ovs_bridge(self, delete_bridge,
399
362
  delete_ovs_vif_port, delete_ovs_bridge):
400
363
  calls = {
401
364
  'delete_bridge': [mock.call('qbrvif-xxx-yyy', 'qvbb679325f-ca')],
@@ -403,32 +366,12 @@ class PluginTest(testtools.TestCase):
403
366
  'br0', 'qvob679325f-ca', qos_type='linux-noop'
404
367
  )]
405
368
  }
406
- mock_sys.platform = 'linux'
407
369
  plugin = ovs.OvsPlugin.load(constants.PLUGIN_NAME)
408
370
  plugin.unplug(self.vif_ovs_hybrid, self.instance)
409
371
  delete_bridge.assert_has_calls(calls['delete_bridge'])
410
372
  delete_ovs_vif_port.assert_has_calls(calls['delete_ovs_vif_port'])
411
373
  delete_ovs_bridge.assert_not_called()
412
374
 
413
- @mock.patch.object(ovsdb_lib.BaseOVS, 'delete_ovs_vif_port')
414
- @mock.patch.object(ovs, 'sys')
415
- def _check_unplug_ovs_windows(self, vif, mock_sys, delete_ovs_vif_port):
416
- mock_sys.platform = constants.PLATFORM_WIN32
417
- plugin = ovs.OvsPlugin.load(constants.PLUGIN_NAME)
418
- plugin.unplug(vif, self.instance)
419
- delete_ovs_vif_port.assert_called_once_with('br0', vif.id,
420
- delete_netdev=False)
421
-
422
- @mock.patch.object(ovsdb_lib.BaseOVS, 'delete_ovs_bridge')
423
- def test_unplug_ovs_windows(self, delete_ovs_bridge):
424
- self._check_unplug_ovs_windows(self.vif_ovs)
425
- delete_ovs_bridge.assert_not_called()
426
-
427
- @mock.patch.object(ovsdb_lib.BaseOVS, 'delete_ovs_bridge')
428
- def test_unplug_ovs_bridge_windows(self, delete_ovs_bridge):
429
- self._check_unplug_ovs_windows(self.vif_ovs_hybrid)
430
- delete_ovs_bridge.assert_not_called()
431
-
432
375
  @mock.patch.object(ovs.OvsPlugin, '_create_vif_port')
433
376
  def test_plug_ovs_vhostuser(self, _create_vif_port):
434
377
  dp_type = ovs.OvsPlugin._get_vif_datapath_type(self.vif_vhostuser)
@@ -1,30 +0,0 @@
1
- # Licensed under the Apache License, Version 2.0 (the "License"); you may
2
- # not use this file except in compliance with the License. You may obtain
3
- # a copy of the License at
4
- #
5
- # http://www.apache.org/licenses/LICENSE-2.0
6
- #
7
- # Unless required by applicable law or agreed to in writing, software
8
- # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9
- # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10
- # License for the specific language governing permissions and limitations
11
- # under the License.
12
-
13
- import os
14
- import warnings
15
-
16
- from oslo_log import log as logging
17
-
18
- if os.name == 'nt':
19
- warnings.warn('Support for Windows OS is deprecated.',
20
- category=DeprecationWarning)
21
- from os_vif.internal.ip.windows.impl_netifaces import \
22
- Netifaces as ip_lib_class
23
- else:
24
- from os_vif.internal.ip.linux.impl_pyroute2 import \
25
- PyRoute2 as ip_lib_class
26
-
27
-
28
- LOG = logging.getLogger(__name__)
29
-
30
- ip = ip_lib_class()
@@ -1,47 +0,0 @@
1
- # Derived from: neutron/agent/windows/ip_lib.py
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License"); you may
4
- # not use this file except in compliance with the License. You may obtain
5
- # a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11
- # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12
- # License for the specific language governing permissions and limitations
13
- # under the License.
14
-
15
- import netifaces
16
-
17
- from oslo_log import log as logging
18
-
19
- from os_vif import exception
20
- from os_vif.internal.ip import ip_command
21
-
22
- LOG = logging.getLogger(__name__)
23
-
24
-
25
- class Netifaces(ip_command.IpCommand):
26
-
27
- def exists(self, device):
28
- """Return True if the device exists in the namespace."""
29
- try:
30
- return bool(netifaces.ifaddresses(device))
31
- except ValueError:
32
- LOG.warning("The device does not exist on the system: %s", device)
33
- return False
34
- except OSError:
35
- LOG.error("Failed to get interface addresses: %s", device)
36
- return False
37
-
38
- def set(self, device, check_exit_code=None, state=None, mtu=None,
39
- address=None, promisc=None, master=None):
40
- exception.NotImplementedForOS(function='ip.set', os='Windows')
41
-
42
- def add(self, device, dev_type, check_exit_code=None, peer=None, link=None,
43
- vlan_id=None):
44
- exception.NotImplementedForOS(function='ip.add', os='Windows')
45
-
46
- def delete(self, device, check_exit_code=None):
47
- exception.NotImplementedForOS(function='ip.delete', os='Windows')