aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/Policer.py
diff options
context:
space:
mode:
authorJan Gelety <jgelety@cisco.com>2019-09-11 19:49:29 +0200
committerJan Gelety <jgelety@cisco.com>2019-12-10 11:04:18 +0000
commit8fc9b28d7a0381981e2cb614b02783b8238f65f2 (patch)
treec6b82bf9882272bf92a55bd9e498b284a5a248b6 /resources/libraries/python/Policer.py
parentf7e953e01896a70bef6da0845935da25cd3122f5 (diff)
CSIT-1597 API cleanup: classify
- cover API changes in VPP: https://gerrit.fd.io/r/c/vpp/+/21551 - move vpp stable build to 20.01-rc0~821 - tap tests tagged 'EXPECTED_FAILING' until necessary vpp api change https://gerrit.fd.io/r/c/vpp/+/21706 and csit code is adapted Change-Id: If4b9b7b5bc207612d08aa8aa4469a5361e058fc3 Signed-off-by: Jan Gelety <jgelety@cisco.com>
Diffstat (limited to 'resources/libraries/python/Policer.py')
-rw-r--r--resources/libraries/python/Policer.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/resources/libraries/python/Policer.py b/resources/libraries/python/Policer.py
index d5500e1d89..2c4cc66d2c 100644
--- a/resources/libraries/python/Policer.py
+++ b/resources/libraries/python/Policer.py
@@ -180,7 +180,7 @@ class Policer:
def policer_classify_set_interface(
node, interface, ip4_table_index=Constants.BITWISE_NON_ZERO,
ip6_table_index=Constants.BITWISE_NON_ZERO,
- l2_table_index=Constants.BITWISE_NON_ZERO, is_add=1):
+ l2_table_index=Constants.BITWISE_NON_ZERO, is_add=True):
"""Set/unset policer classify interface.
:param node: VPP node.
@@ -192,12 +192,13 @@ class Policer:
(Default value = ~0)
:param l2_table_index: L2 classify table index (~0 to skip).
(Default value = ~0)
- :param is_add: Set if non-zero, else unset.
+ :param is_add: Set if True, else unset.
:type node: dict
:type interface: str or int
:type ip4_table_index: int
:type ip6_table_index: int
:type l2_table_index: int
+ :type is_add: bool
"""
if isinstance(interface, str):
sw_if_index = Topology.get_interface_sw_index(node, interface)
@@ -206,8 +207,8 @@ class Policer:
cmd = u"policer_classify_set_interface"
args = dict(
- is_add=int(is_add),
- sw_if_index=sw_if_index,
+ is_add=is_add,
+ sw_if_index=int(sw_if_index),
ip4_table_index=int(ip4_table_index),
ip6_table_index=int(ip6_table_index),
l2_table_index=int(l2_table_index)