From f80aa722a664324de1efe453803794a50c9e5cb1 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Wed, 29 Jul 2015 13:39:20 +0200 Subject: [PATCH] Added missing [qos] section into neutron.conf Also renamed service_notification_drivers into notification_drivers since it's clear where it belongs anyway (it's in neutron.conf meaning it's a server side configuration value). Change-Id: I64610e4b60112daec982a8cacded9b9b936c10bd Partially-Implements: blueprint quantum-qos-api --- etc/neutron.conf | 4 ++++ neutron/services/qos/notification_drivers/manager.py | 6 +++--- .../unit/services/qos/notification_drivers/test_manager.py | 2 +- setup.cfg | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/etc/neutron.conf b/etc/neutron.conf index d2b838f251f..29a4095f813 100755 --- a/etc/neutron.conf +++ b/etc/neutron.conf @@ -1017,3 +1017,7 @@ lock_path = $state_path/lock # Deprecated, use rpc_backend=kombu+memory or rpc_backend=fake (boolean value) # Deprecated group/name - [DEFAULT]/fake_rabbit # fake_rabbit = false + +[qos] +# Drivers list to use to send the update notification +# notification_drivers = message_queue diff --git a/neutron/services/qos/notification_drivers/manager.py b/neutron/services/qos/notification_drivers/manager.py index f9b884f9d6e..2dd5e11977b 100644 --- a/neutron/services/qos/notification_drivers/manager.py +++ b/neutron/services/qos/notification_drivers/manager.py @@ -15,9 +15,9 @@ from oslo_log import log as logging from neutron.i18n import _LI from neutron import manager -QOS_DRIVER_NAMESPACE = 'neutron.qos.service_notification_drivers' +QOS_DRIVER_NAMESPACE = 'neutron.qos.notification_drivers' QOS_PLUGIN_OPTS = [ - cfg.ListOpt('service_notification_drivers', + cfg.ListOpt('notification_drivers', default='message_queue', help=_('Drivers list to use to send the update notification')), ] @@ -31,7 +31,7 @@ class QosServiceNotificationDriverManager(object): def __init__(self): self.notification_drivers = [] - self._load_drivers(cfg.CONF.qos.service_notification_drivers) + self._load_drivers(cfg.CONF.qos.notification_drivers) def update_policy(self, qos_policy): for driver in self.notification_drivers: diff --git a/neutron/tests/unit/services/qos/notification_drivers/test_manager.py b/neutron/tests/unit/services/qos/notification_drivers/test_manager.py index 68c26ff5d30..6f67fa605b9 100644 --- a/neutron/tests/unit/services/qos/notification_drivers/test_manager.py +++ b/neutron/tests/unit/services/qos/notification_drivers/test_manager.py @@ -27,7 +27,7 @@ DUMMY_DRIVER = ("neutron.tests.unit.services.qos.notification_drivers." def _load_multiple_drivers(): cfg.CONF.set_override( - "service_notification_drivers", + "notification_drivers", ["message_queue", DUMMY_DRIVER], "qos") diff --git a/setup.cfg b/setup.cfg index 5c62423af29..b3a3608a44f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -155,7 +155,7 @@ neutron.service_providers = # These are for backwards compat with Juno vpnaas service provider configuration values neutron.services.vpn.service_drivers.cisco_ipsec.CiscoCsrIPsecVPNDriver = neutron_vpnaas.services.vpn.service_drivers.cisco_ipsec:CiscoCsrIPsecVPNDriver neutron.services.vpn.service_drivers.ipsec.IPsecVPNDriver = neutron_vpnaas.services.vpn.service_drivers.ipsec:IPsecVPNDriver -neutron.qos.service_notification_drivers = +neutron.qos.notification_drivers = message_queue = neutron.services.qos.notification_drivers.message_queue:RpcQosServiceNotificationDriver neutron.ml2.type_drivers = flat = neutron.plugins.ml2.drivers.type_flat:FlatTypeDriver