def setUp(self): ml2_config.cfg.CONF.set_override('extension_drivers', self._extension_drivers, group='ml2') driver_mgr_config.register_qos_plugin_opts(ml2_config.cfg.CONF) ml2_config.cfg.CONF.set_override('notification_drivers', ['df_notification_driver'], 'qos') super(TestDFQosNotificationDriver, self).setUp() self.plugin = (manager.NeutronManager.get_service_plugins()['QOS']) self.driver = ( self.plugin.notification_driver_manager.notification_drivers[0])
def setUp(self): super(TestQosDriversManagerBase, self).setUp() self.config_parse() self.setup_coreplugin(load_plugins=False) config = cfg.ConfigOpts() driver_mgr_config.register_qos_plugin_opts(config) self.policy_data = {'policy': { 'id': uuidutils.generate_uuid(), 'project_id': uuidutils.generate_uuid(), 'name': 'test-policy', 'description': 'test policy description', 'shared': True}} self.context = context.get_admin_context() self.policy = policy_object.QosPolicy(self.context, **self.policy_data['policy']) ctxt = None self.kwargs = {'context': ctxt}
def setUp(self): super(TestQosDriversManagerBase, self).setUp() self.config_parse() self.setup_coreplugin(load_plugins=False) config = cfg.ConfigOpts() notif_driver_mgr_config.register_qos_plugin_opts(config)
# # 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. from oslo_config import cfg from oslo_log import log as logging from neutron._i18n import _LI from neutron.conf.services import qos_driver_manager as qos_mgr from neutron import manager from neutron.services.qos.notification_drivers import message_queue QOS_DRIVER_NAMESPACE = 'neutron.qos.notification_drivers' qos_mgr.register_qos_plugin_opts() LOG = logging.getLogger(__name__) class QosServiceNotificationDriverManager(object): def __init__(self): self.notification_drivers = [] self._load_drivers(cfg.CONF.qos.notification_drivers) def update_policy(self, context, qos_policy): for driver in self.notification_drivers: driver.update_policy(context, qos_policy) def delete_policy(self, context, qos_policy):
# 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. from oslo_config import cfg from oslo_log import log as logging from neutron.conf.services import qos_driver_manager as qos_mgr from neutron._i18n import _, _LI from neutron import manager QOS_DRIVER_NAMESPACE = 'neutron.qos.notification_drivers' qos_mgr.register_qos_plugin_opts() LOG = logging.getLogger(__name__) class QosServiceNotificationDriverManager(object): def __init__(self): self.notification_drivers = [] self._load_drivers(cfg.CONF.qos.notification_drivers) def update_policy(self, context, qos_policy): for driver in self.notification_drivers: driver.update_policy(context, qos_policy) def delete_policy(self, context, qos_policy):