Add traffic control constants

Change-Id: If1902521086341f1f3786241509a000eaffe72b2
Related-Bug: #1560963
This commit is contained in:
Rodolfo Alonso Hernandez 2019-01-30 14:02:43 +00:00
parent 7f7f5e2414
commit f8b63272ff
2 changed files with 20 additions and 1 deletions

View File

@ -12,7 +12,6 @@
# implied. # implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# TODO(salv-orlando): Verify if a single set of operational # TODO(salv-orlando): Verify if a single set of operational
# status constants is achievable # status constants is achievable
NET_STATUS_ACTIVE = 'ACTIVE' NET_STATUS_ACTIVE = 'ACTIVE'
@ -333,6 +332,17 @@ VALID_DIRECTIONS = (INGRESS_DIRECTION, EGRESS_DIRECTION)
PROVISIONAL_IPV6_PD_PREFIX = '::/64' 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): class Sentinel(object):
"""A constant object that does not change even when copied.""" """A constant object that does not change even when copied."""

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.