"Fossies" - the Fresh Open Source Software Archive

Member "neutron-14.0.3/neutron/agent/l2/extensions/qos_linux.py" (22 Oct 2019, 1158 Bytes) of package /linux/misc/openstack/neutron-14.0.3.tar.gz:

As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "qos_linux.py" see the Fossies "Dox" file reference documentation.

    1 # Copyright (c) 2017 Cloudbase Solutions
    2 # All Rights Reserved.
    3 #
    4 #    Licensed under the Apache License, Version 2.0 (the "License"); you may
    5 #    not use this file except in compliance with the License. You may obtain
    6 #    a copy of the License at
    7 #
    8 #         http://www.apache.org/licenses/LICENSE-2.0
    9 #
   10 #    Unless required by applicable law or agreed to in writing, software
   11 #    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
   12 #    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
   13 #    License for the specific language governing permissions and limitations
   14 #    under the License.
   16 from neutron.agent.l2.extensions import qos
   17 from neutron.agent.linux import tc_lib
   20 class QosLinuxAgentDriver(qos.QosAgentDriver):
   22     def _get_egress_burst_value(self, rule):
   23         """Return burst value used for egress bandwidth limitation.
   25         Because Egress bw_limit is done on ingress qdisc by LB and ovs drivers
   26         so it will return burst_value used by tc on as ingress_qdisc.
   27         """
   28         return tc_lib.TcCommand.get_ingress_qdisc_burst_value(
   29             rule.max_kbps, rule.max_burst_kbps)