![Gary Kotton](/assets/img/avatar_default.png)
1. Use new enginefacade + l3_db breakage Use reader and writer for db operations. Partially-Implements blueprint: enginefacade-switch 2. Fix the callback pass for _prevent_l3_port_delete_callback which was changed in commit Ia8ac4f510c003667cac95f76dea0e9ae55159878 3. QoS driver integration Commit I5f747635be3fd66b70326d9f94c85a6736286bd2 removes the qos notification driver. Fixing the nsx-v and nsx-v3 to work only with the regular driver 4. _get_extra_routes_dict_by_router_id was removed by Ia815d6c597730bd5cb49455e7409ca747a4cc22c 5. Floating IP association without subnet gateway IP not supported by our plugins. Added in commit If212c36d918ed57400a53f4b5fa1925b3d1fa6fd Co-Authored-by: Adit Sarfaty <asarfaty@vmware.com> Change-Id: I277ec5c38c5895337011019f71d586b254bfafde
72 lines
2.2 KiB
Python
72 lines
2.2 KiB
Python
# Copyright 2017 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.
|
|
|
|
from oslo_log import log as logging
|
|
|
|
from neutron.services.qos.drivers import base
|
|
from neutron.services.qos import qos_consts
|
|
|
|
LOG = logging.getLogger(__name__)
|
|
DRIVER = None
|
|
SUPPORTED_RULES = [qos_consts.RULE_TYPE_BANDWIDTH_LIMIT,
|
|
qos_consts.RULE_TYPE_MINIMUM_BANDWIDTH]
|
|
|
|
|
|
class NSXvQosDriver(base.DriverBase):
|
|
|
|
@staticmethod
|
|
def create(core_plugin):
|
|
return NSXvQosDriver(
|
|
core_plugin,
|
|
name='NSXvQosDriver',
|
|
vif_types=None,
|
|
vnic_types=None,
|
|
supported_rules=SUPPORTED_RULES,
|
|
requires_rpc_notifications=False)
|
|
|
|
def __init__(self, core_plugin, **kwargs):
|
|
super(NSXvQosDriver, self).__init__(**kwargs)
|
|
self.core_plugin = core_plugin
|
|
self.requires_rpc_notifications = False
|
|
|
|
def is_vif_type_compatible(self, vif_type):
|
|
return True
|
|
|
|
def is_vnic_compatible(self, vnic_type):
|
|
return True
|
|
|
|
def create_policy(self, context, policy):
|
|
pass
|
|
|
|
def update_policy(self, context, policy):
|
|
# get all the bound networks of this policy
|
|
networks = policy.get_bound_networks()
|
|
for net_id in networks:
|
|
# update the new bw limitations for this network
|
|
self.core_plugin._update_qos_on_backend_network(
|
|
context, net_id, policy.id)
|
|
|
|
def delete_policy(self, context, policy):
|
|
pass
|
|
|
|
|
|
def register(core_plugin):
|
|
"""Register the NSX-V QoS driver."""
|
|
global DRIVER
|
|
if not DRIVER:
|
|
DRIVER = NSXvQosDriver.create(core_plugin)
|
|
LOG.debug('NSXvQosDriver QoS driver registered')
|