QoS service plugin stub
This patch introduces the QoS service plugin which implements a stub of the API extension. This is patch is a basic step to be able to create an experimental job enabling this service so we can do api tests. Change-Id: Ib583e98c232ca628ba2a4bd48527eb84584c6212
This commit is contained in:
parent
96d1cb1ae2
commit
2ff19be1db
|
@ -75,7 +75,7 @@
|
||||||
# of its entrypoint name.
|
# of its entrypoint name.
|
||||||
#
|
#
|
||||||
# service_plugins =
|
# service_plugins =
|
||||||
# Example: service_plugins = router,firewall,lbaas,vpnaas,metering
|
# Example: service_plugins = router,firewall,lbaas,vpnaas,metering,qos
|
||||||
|
|
||||||
# Paste configuration file
|
# Paste configuration file
|
||||||
# api_paste_config = api-paste.ini
|
# api_paste_config = api-paste.ini
|
||||||
|
|
|
@ -32,12 +32,13 @@ EXT_TO_SERVICE_MAPPING = {
|
||||||
'fwaas': FIREWALL,
|
'fwaas': FIREWALL,
|
||||||
'vpnaas': VPN,
|
'vpnaas': VPN,
|
||||||
'metering': METERING,
|
'metering': METERING,
|
||||||
'router': L3_ROUTER_NAT
|
'router': L3_ROUTER_NAT,
|
||||||
|
'qos': QOS,
|
||||||
}
|
}
|
||||||
|
|
||||||
# TODO(salvatore-orlando): Move these (or derive them) from conf file
|
# TODO(salvatore-orlando): Move these (or derive them) from conf file
|
||||||
ALLOWED_SERVICES = [CORE, DUMMY, LOADBALANCER, FIREWALL, VPN, METERING,
|
ALLOWED_SERVICES = [CORE, DUMMY, LOADBALANCER, FIREWALL, VPN, METERING,
|
||||||
L3_ROUTER_NAT, LOADBALANCERV2]
|
L3_ROUTER_NAT, LOADBALANCERV2, QOS]
|
||||||
|
|
||||||
COMMON_PREFIXES = {
|
COMMON_PREFIXES = {
|
||||||
CORE: "",
|
CORE: "",
|
||||||
|
@ -48,6 +49,7 @@ COMMON_PREFIXES = {
|
||||||
VPN: "/vpn",
|
VPN: "/vpn",
|
||||||
METERING: "/metering",
|
METERING: "/metering",
|
||||||
L3_ROUTER_NAT: "",
|
L3_ROUTER_NAT: "",
|
||||||
|
QOS: "/qos",
|
||||||
}
|
}
|
||||||
|
|
||||||
# Service operation status constants
|
# Service operation status constants
|
||||||
|
|
|
@ -0,0 +1,85 @@
|
||||||
|
# Copyright (c) 2015 Red Hat 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 neutron.extensions import qos
|
||||||
|
|
||||||
|
|
||||||
|
class QoSPlugin(qos.QoSPluginBase):
|
||||||
|
"""Implementation of the Neutron QoS Service Plugin.
|
||||||
|
|
||||||
|
This class implements a Quality of Service plugin that
|
||||||
|
provides quality of service parameters over ports and
|
||||||
|
networks.
|
||||||
|
|
||||||
|
"""
|
||||||
|
supported_extension_aliases = ['qos']
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
super(QoSPlugin, self).__init__()
|
||||||
|
#self.register_rpc()
|
||||||
|
#self.register_port_callbacks()
|
||||||
|
#self.register_net_callbacks()
|
||||||
|
|
||||||
|
def register_rpc(self):
|
||||||
|
# RPC support
|
||||||
|
# TODO(ajo): register ourselves to the generic RPC framework
|
||||||
|
# so we will provide QoS information for ports and
|
||||||
|
# networks.
|
||||||
|
pass
|
||||||
|
|
||||||
|
def register_port_callbacks(self):
|
||||||
|
# TODO(qos): Register the callbacks to properly manage
|
||||||
|
# extension of resources
|
||||||
|
pass
|
||||||
|
|
||||||
|
def register_net_callbacks(self):
|
||||||
|
# TODO(qos): Register the callbacks to properly manage
|
||||||
|
# extension of resources
|
||||||
|
pass
|
||||||
|
|
||||||
|
def create_qos_policy(self, context, qos_policy):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def update_qos_policy(self, context, qos_policy_id, qos_policy):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def delete_qos_policy(self, context, qos_policy_id):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_qos_policy(self, context, qos_policy_id, fields=None):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_qos_policies(self, context, filters=None, fields=None,
|
||||||
|
sorts=None, limit=None, marker=None,
|
||||||
|
page_reverse=False):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def create_qos_bandwidth_limit_rule(self, context,
|
||||||
|
qos_bandwidthlimit_rule):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def update_qos_bandwidth_limit_rule(self, context, rule_id, rule):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_qos_bandwidth_limit_rule(self, context, rule_id, fields=None):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def delete_qos_bandwith_limit_rule(self, context, rule_id):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def get_qos_bandwith_limit_rules(self, context, filters=None, fields=None,
|
||||||
|
sorts=None, limit=None, marker=None,
|
||||||
|
page_reverse=False):
|
||||||
|
pass
|
|
@ -143,6 +143,7 @@ neutron.service_plugins =
|
||||||
neutron.services.loadbalancer.plugin.LoadBalancerPlugin = neutron_lbaas.services.loadbalancer.plugin:LoadBalancerPlugin
|
neutron.services.loadbalancer.plugin.LoadBalancerPlugin = neutron_lbaas.services.loadbalancer.plugin:LoadBalancerPlugin
|
||||||
neutron.services.vpn.plugin.VPNDriverPlugin = neutron_vpnaas.services.vpn.plugin:VPNDriverPlugin
|
neutron.services.vpn.plugin.VPNDriverPlugin = neutron_vpnaas.services.vpn.plugin:VPNDriverPlugin
|
||||||
ibm_l3 = neutron.services.l3_router.l3_sdnve:SdnveL3ServicePlugin
|
ibm_l3 = neutron.services.l3_router.l3_sdnve:SdnveL3ServicePlugin
|
||||||
|
qos = neutron.services.qos.qos_plugin:QoSPlugin
|
||||||
neutron.service_providers =
|
neutron.service_providers =
|
||||||
# These are for backwards compat with Juno firewall service provider configuration values
|
# These are for backwards compat with Juno firewall service provider configuration values
|
||||||
neutron.services.firewall.drivers.linux.iptables_fwaas.IptablesFwaasDriver = neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas:IptablesFwaasDriver
|
neutron.services.firewall.drivers.linux.iptables_fwaas.IptablesFwaasDriver = neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas:IptablesFwaasDriver
|
||||||
|
|
Loading…
Reference in New Issue