aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/SRv6.py
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2024-04-11 18:24:03 +0200
committerVratko Polak <vrpolak@cisco.com>2024-04-15 12:58:43 +0200
commit6c2ca55d7ad00605976d96b14d83786a35f383c2 (patch)
treeecb2e1e8ce8ad1e393ed1184d9f3539d0d928d64 /resources/libraries/python/SRv6.py
parent872481a0f65472e8d40f7503f9fc7e5766c428eb (diff)
feat(api): Use newest API messages after rls2402
+ gtpu_add_del_tunnel_v2 + Add comments on used values and unused fields. + ipsec_sad_entry_add_v2 + Explicitly pass current default values. + ipsec_sa_v5_dump + policer_add + The old is_add argument removed, it was never false. + sr_policy_add_v2 + Add comments about currently unused fields. + Support also older VP builds with wrong reply. + rdma_create_v4 + Add comments about unused fields. Change-Id: I3d5bc345c4cf099661626770c4d86bc230643cca Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/python/SRv6.py')
-rw-r--r--resources/libraries/python/SRv6.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/resources/libraries/python/SRv6.py b/resources/libraries/python/SRv6.py
index d16c3529c3..0170df5ef6 100644
--- a/resources/libraries/python/SRv6.py
+++ b/resources/libraries/python/SRv6.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2023 Cisco and/or its affiliates.
+# Copyright (c) 2024 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -222,15 +222,14 @@ class SRv6:
:type sid_list: list
:type mode: str
"""
- # TODO: Convert to use sr_policy_add_v2.
- # The conversion is not straightforward so it was not done when bumping.
- cmd = u"sr_policy_add"
+ cmd = u"sr_policy_add_v2"
args = dict(
bsid_addr=IPv6Address(bsid).packed,
weight=1,
is_encap=bool(mode == u"encap"),
- is_spray=False,
- sids=SRv6.create_srv6_sid_list(sid_list)
+ type=0, # Neither SPRAY nor TEF are needed yet.
+ sids=SRv6.create_srv6_sid_list(sid_list),
+ # encap_src is optional, do not set yet.
)
err_msg = f"Failed to add SR policy for BindingSID {bsid} " \
f"on host {node[u'host']}"