Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
feat(api): Use newest API messages after rls2402
[csit.git]
/
resources
/
libraries
/
python
/
SRv6.py
diff --git
a/resources/libraries/python/SRv6.py
b/resources/libraries/python/SRv6.py
index
d16c352
..
0170df5
100644
(file)
--- a/
resources/libraries/python/SRv6.py
+++ b/
resources/libraries/python/SRv6.py
@@
-1,4
+1,4
@@
-# Copyright (c) 202
3
Cisco and/or its affiliates.
+# Copyright (c) 202
4
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:
# 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
"""
: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"),
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']}"
)
err_msg = f"Failed to add SR policy for BindingSID {bsid} " \
f"on host {node[u'host']}"