From 3cb0bbace8d9cbb77806f976b7b57e9dc1ca98aa Mon Sep 17 00:00:00 2001 From: Gary Kotton Date: Thu, 3 Mar 2016 07:14:05 -0800 Subject: [PATCH] NSX|MH: rename qos extension to qos_queue We need to rename the Qos extension as this causes issues when using the Neutron Qos extension (which is the end goal) In addition to this the patch deletes the nvp_qos extension. That was marked for deprecation in Kilo. Change-Id: I4d9d3cf40a83f579b76bf5f0642d045785a271bd --- vmware_nsx/db/qos_db.py | 2 +- vmware_nsx/extensions/nvp_qos.py | 36 ------------------- .../extensions/{qos.py => qos_queue.py} | 2 +- vmware_nsx/plugins/nsx_mh/plugin.py | 3 +- .../tests/unit/extensions/test_qosqueues.py | 4 +-- 5 files changed, 5 insertions(+), 42 deletions(-) delete mode 100644 vmware_nsx/extensions/nvp_qos.py rename vmware_nsx/extensions/{qos.py => qos_queue.py} (99%) diff --git a/vmware_nsx/db/qos_db.py b/vmware_nsx/db/qos_db.py index cf0714452e..ded6483dc7 100644 --- a/vmware_nsx/db/qos_db.py +++ b/vmware_nsx/db/qos_db.py @@ -24,7 +24,7 @@ from oslo_utils import uuidutils from vmware_nsx._i18n import _LI from vmware_nsx.db import nsx_models -from vmware_nsx.extensions import qos +from vmware_nsx.extensions import qos_queue as qos LOG = log.getLogger(__name__) diff --git a/vmware_nsx/extensions/nvp_qos.py b/vmware_nsx/extensions/nvp_qos.py deleted file mode 100644 index 969eca8513..0000000000 --- a/vmware_nsx/extensions/nvp_qos.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 2013 VMware, Inc. -# -# All Rights Reserved -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -# TODO(arosen): This is deprecated in Juno, and -# to be removed in Kxxxx. - -from vmware_nsx.extensions import qos - - -class Nvp_qos(qos.Qos): - """(Deprecated) Port Queue extension.""" - - @classmethod - def get_name(cls): - return "nvp-qos" - - @classmethod - def get_alias(cls): - return "nvp-qos" - - @classmethod - def get_description(cls): - return "NVP QoS extension (deprecated)." diff --git a/vmware_nsx/extensions/qos.py b/vmware_nsx/extensions/qos_queue.py similarity index 99% rename from vmware_nsx/extensions/qos.py rename to vmware_nsx/extensions/qos_queue.py index 3020fa0bcf..fcbe2f7bdc 100644 --- a/vmware_nsx/extensions/qos.py +++ b/vmware_nsx/extensions/qos_queue.py @@ -163,7 +163,7 @@ EXTENDED_ATTRIBUTES_2_0 = { } -class Qos(extensions.ExtensionDescriptor): +class Qos_queue(extensions.ExtensionDescriptor): """Port Queue extension.""" @classmethod diff --git a/vmware_nsx/plugins/nsx_mh/plugin.py b/vmware_nsx/plugins/nsx_mh/plugin.py index cb1fe2a699..ce29b0ce84 100644 --- a/vmware_nsx/plugins/nsx_mh/plugin.py +++ b/vmware_nsx/plugins/nsx_mh/plugin.py @@ -76,7 +76,7 @@ from vmware_nsx.db import qos_db from vmware_nsx.dhcp_meta import modes as dhcpmeta_modes from vmware_nsx.extensions import maclearning as mac_ext from vmware_nsx.extensions import networkgw -from vmware_nsx.extensions import qos +from vmware_nsx.extensions import qos_queue as qos from vmware_nsx.nsxlib.mh import l2gateway as l2gwlib from vmware_nsx.nsxlib.mh import queue as queuelib from vmware_nsx.nsxlib.mh import router as routerlib @@ -116,7 +116,6 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin, "mac-learning", "multi-provider", "network-gateway", - "nvp-qos", "port-security", "provider", "qos-queue", diff --git a/vmware_nsx/tests/unit/extensions/test_qosqueues.py b/vmware_nsx/tests/unit/extensions/test_qosqueues.py index ebd7fa8742..8a85ec3a82 100644 --- a/vmware_nsx/tests/unit/extensions/test_qosqueues.py +++ b/vmware_nsx/tests/unit/extensions/test_qosqueues.py @@ -22,7 +22,7 @@ import webob.exc from neutron import context from neutron.tests.unit.api import test_extensions from vmware_nsx.db import qos_db -from vmware_nsx.extensions import qos as ext_qos +from vmware_nsx.extensions import qos_queue as ext_qos from vmware_nsx.nsxlib import mh as nsxlib from vmware_nsx.tests import unit as vmware from vmware_nsx.tests.unit.nsx_mh import test_plugin as test_nsx_plugin @@ -31,7 +31,7 @@ from vmware_nsx.tests.unit.nsx_mh import test_plugin as test_nsx_plugin class QoSTestExtensionManager(object): def get_resources(self): - return ext_qos.Qos.get_resources() + return ext_qos.Qos_queue.get_resources() def get_actions(self): return []