Browse Source

Add traffic control constants

Change-Id: If1902521086341f1f3786241509a000eaffe72b2
Related-Bug: #1560963
tags/1.25.0
Rodolfo Alonso Hernandez 1 year ago
parent
commit
f8b63272ff
2 changed files with 20 additions and 1 deletions
  1. +11
    -1
      neutron_lib/constants.py
  2. +9
    -0
      releasenotes/notes/traffic-control-constants-b8120d1bea0681bf.yaml

+ 11
- 1
neutron_lib/constants.py View File

@@ -12,7 +12,6 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# TODO(salv-orlando): Verify if a single set of operational
# status constants is achievable
NET_STATUS_ACTIVE = 'ACTIVE'
@@ -333,6 +332,17 @@ VALID_DIRECTIONS = (INGRESS_DIRECTION, EGRESS_DIRECTION)

PROVISIONAL_IPV6_PD_PREFIX = '::/64'

# Traffic control
TC_QDISC_TYPE_HTB = 'htb'
TC_QDISC_TYPE_TBF = 'tbf'
TC_QDISC_TYPE_INGRESS = 'ingress'
TC_QDISC_TYPES = (TC_QDISC_TYPE_HTB, TC_QDISC_TYPE_TBF, TC_QDISC_TYPE_INGRESS)

TC_QDISC_INGRESS_ID = 'ffff:'

TC_QDISC_PARENTS = {'root': 0xffffffff,
'ingress': 0xfffffff1}


class Sentinel(object):
"""A constant object that does not change even when copied."""

+ 9
- 0
releasenotes/notes/traffic-control-constants-b8120d1bea0681bf.yaml View File

@@ -0,0 +1,9 @@
---
features:
- |
Adds traffic control related constants:

* Qdisc types: ``htb``, ``tbf`` and ``ingress``, used in Neutron ``tc_lib``
* Qdisc ID: for ``ingress`` type, because this one is specific only for
ingress traffic.
* Qdisc parents: for ``root`` and ``ingress`` types.

Loading…
Cancel
Save