aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/Policer.py
diff options
context:
space:
mode:
authorJan Gelety <jgelety@cisco.com>2020-11-26 15:27:26 +0100
committerJan Gelety <jgelety@cisco.com>2020-12-16 14:00:10 +0000
commit6b40a760505ae11c896deb68f92775cdf04ba965 (patch)
tree080285dea817a68161c70bcca6db07b1f8f8c358 /resources/libraries/python/Policer.py
parenta28e97a231fbddc2cc04f073dd8b402c29cc5aaf (diff)
API: deprecated IPSEC APIs
Jira: CSIT-1597 + add ipsec_sa tear down action Change-Id: I4d1e6f26c14e61e8ddc6f29fbf5528a034c84eb0 Signed-off-by: Jan Gelety <jgelety@cisco.com>
Diffstat (limited to 'resources/libraries/python/Policer.py')
-rw-r--r--resources/libraries/python/Policer.py25
1 files changed, 2 insertions, 23 deletions
diff --git a/resources/libraries/python/Policer.py b/resources/libraries/python/Policer.py
index af2321bae9..37b1c7f745 100644
--- a/resources/libraries/python/Policer.py
+++ b/resources/libraries/python/Policer.py
@@ -16,6 +16,7 @@
from enum import IntEnum
from resources.libraries.python.Constants import Constants
+from resources.libraries.python.IPUtil import IpDscp
from resources.libraries.python.PapiExecutor import PapiSocketExecutor
from resources.libraries.python.topology import Topology
@@ -59,28 +60,6 @@ class PolicerPreColor(IntEnum):
VIOLATE_COLOR = 2
-class DSCP(IntEnum):
- """DSCP for mark-and-transmit action."""
- D_CS0 = 0
- D_CS1 = 8
- D_CS2 = 16
- D_CS3 = 24
- D_CS4 = 32
- D_vCS5 = 40
- D_CS6 = 48
- D_CS7 = 56
- D_AF11 = 10
- D_AF12 = 12
- D_AF13 = 14
- D_AF21 = 18
- D_AF22 = 20
- D_AF23 = 22
- D_AF31 = 26
- D_AF32 = 28
- D_AF33 = 30
- D_EF = 46
-
-
class Policer:
"""Policer utilities."""
@@ -240,4 +219,4 @@ class Policer:
:returns: DSCP numeric value.
:rtype: int
"""
- return getattr(DSCP, f"D_{dscp.upper()}").value
+ return getattr(IpDscp, f"IP_API_DSCP_{dscp.upper()}").value