X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FSRv6.py;h=0170df5ef61a2b59e7bc8697c068f27303e629ca;hb=HEAD;hp=eca22a2b1744457bd9b4258a9996f38ab3d1cc31;hpb=7829fea4a2c8936513fa95215b7d84997f814a69;p=csit.git diff --git a/resources/libraries/python/SRv6.py b/resources/libraries/python/SRv6.py index eca22a2b17..0170df5ef6 100644 --- a/resources/libraries/python/SRv6.py +++ b/resources/libraries/python/SRv6.py @@ -1,4 +1,4 @@ -# Copyright (c) 2021 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,13 +222,14 @@ class SRv6: :type sid_list: list :type mode: str """ - 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']}" @@ -243,7 +244,7 @@ class SRv6: :param node: Given node to show SRv6 policies on. :type node: dict """ - cmd = u"sr_policies_dump" + cmd = u"sr_policies_v2_dump" PapiSocketExecutor.dump_and_log(node, (cmd,)) @staticmethod