neutron: Remove references to dead 'qos-queue' extension

We had assumed that this was used by the out-of-tree XenAPI driver, but
it turns out to have been used by the VMWare NSX QoS extension [1]. This
extension itself is now EOL and the code was removed from the vmware-nsx
package over two years ago [2][3]. There are no remaining references to
this former extension:

  $ cd vmware-nsx
  $ ag qos-queue
  $ git log -S qos-queue --oneline | head -1
  26135f34a retire the NSX MH plugin

We can safely remove this. A release note is included even though this
is a vendor-specific feature that should really never have been merged.

[1] https://github.com/openstack/neutron/blob/fe61e29f/doc/source/admin/archives/adv-features.rst#vmware-nsx-qos-extension
[2] b5f59ece91/vmware_nsx/extensions/qos_queue.py
[3] 26135f34ac

Change-Id: I90171131d671d1b9ef2f93cc13174ebb00e96033
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane 2020-09-25 17:21:07 +01:00
parent 0f7f95b917
commit 36db6b746a
4 changed files with 9 additions and 35 deletions

View File

@ -40,7 +40,6 @@ RESOURCE_REQUEST_GROUPS = 'port-resource-request-groups'
# Third-party extensions
VNIC_INDEX = 'vnic-index' # this is provided by the vmware_nsx project
QOS_QUEUE = 'qos-queue' # TODO(stephenfin): what defines this? Xen?
# Search fields

View File

@ -1385,16 +1385,6 @@ class API:
constants.RESOURCE_REQUEST_GROUPS, context, client,
)
# TODO(stephenfin): This is optionally used by the XenAPI virt driver, but
# I can't find what defines it and suspect it's dead code. Consider
# removing the functionality
def has_qos_queue_extension(self, context=None, client=None):
"""Check if the 'qos-queue' extension is enabled.
This extension is provided by a XenServer neutron plugin...we think.
"""
return self._has_extension(constants.QOS_QUEUE, context, client)
def has_vnic_index_extension(self, context=None, client=None):
"""Check if the 'vnic-index' extension is enabled.
@ -1644,10 +1634,6 @@ class API:
if neutron is None:
neutron = get_client(context)
if self.has_qos_queue_extension(client=neutron):
flavor = instance.get_flavor()
rxtx_factor = flavor.get('rxtx_factor')
port_req_body['port']['rxtx_factor'] = rxtx_factor
port_req_body['port'][constants.BINDING_HOST_ID] = bind_host_id
self._populate_neutron_binding_profile(instance,
pci_request_id,

View File

@ -1173,31 +1173,13 @@ class TestAPI(TestAPIBase):
def test_refresh_neutron_extensions_cache(self):
mocked_client = mock.create_autospec(client.Client)
mocked_client.list_extensions.return_value = {
'extensions': [{'alias': constants.QOS_QUEUE}]}
'extensions': [{'alias': constants.DNS_INTEGRATION}]}
self.api._refresh_neutron_extensions_cache(mocked_client)
self.assertEqual(
{constants.QOS_QUEUE: {'alias': constants.QOS_QUEUE}},
{constants.DNS_INTEGRATION: {'alias': constants.DNS_INTEGRATION}},
self.api.extensions)
mocked_client.list_extensions.assert_called_once_with()
@mock.patch.object(neutronapi, 'get_client')
def test_populate_neutron_extension_values_rxtx_factor(
self, mock_get_client):
mocked_client = mock.create_autospec(client.Client)
mock_get_client.return_value = mocked_client
mocked_client.list_extensions.return_value = {
'extensions': [{'alias': constants.QOS_QUEUE}]}
flavor = objects.Flavor.get_by_name(self.context, 'm1.small')
flavor['rxtx_factor'] = 1
instance = objects.Instance(system_metadata={})
instance.flavor = flavor
port_req_body = {'port': {}}
self.api._populate_neutron_extension_values(self.context, instance,
None, port_req_body)
self.assertEqual(1, port_req_body['port']['rxtx_factor'])
mock_get_client.assert_called_once_with(self.context)
mocked_client.list_extensions.assert_called_once_with()
def test_allocate_for_instance_1(self):
# Allocate one port in one network env.
self._test_allocate_for_instance_with_virtual_interface(1)

View File

@ -0,0 +1,7 @@
---
upgrade:
- |
Support for the ``qos-queue`` extension provided by the vmware-nsx neutron
plugin for the VMWare NSX Manager has been removed. This extension was
removed from the vmware-nsx project when support for NSX-MH was removed in
15.0.0.