diff options
author | Jan Gelety <jgelety@cisco.com> | 2017-12-20 12:40:16 +0100 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2018-01-04 08:15:14 +0000 |
commit | 03f1fa8fbf089b48365fff2bead6a2afb56efd89 (patch) | |
tree | 20fdb79d7cef105d4ee393a241dd6f7e15e86189 /resources/libraries/python/SRv6.py | |
parent | 92cbb44a89ca808df32e4a4cb137bed076a68a94 (diff) |
CSIT-817: L2 keywords for SRv6
- keywords to configure SRv6 on DUT
Change-Id: Ida3b88dd31c78caa3c4ef317996677838a65a658
Signed-off-by: Jan Gelety <jgelety@cisco.com>
Diffstat (limited to 'resources/libraries/python/SRv6.py')
-rw-r--r-- | resources/libraries/python/SRv6.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/resources/libraries/python/SRv6.py b/resources/libraries/python/SRv6.py index a22bb5e832..cafc4a075d 100644 --- a/resources/libraries/python/SRv6.py +++ b/resources/libraries/python/SRv6.py @@ -285,3 +285,21 @@ class SRv6(object): with VatTerminal(node, json_param=False) as vat: vat.vat_terminal_exec_cmd_from_template( 'srv6/sr_steer_policies_show.vat') + + @staticmethod + def set_sr_encaps_source_address(node, ip6_addr): + """Set SRv6 encapsulation source address on the given node. + + :param node: Given node to set SRv6 encapsulation source address on. + :param ip6_addr: Local SID IPv6 address. + :type node: dict + :type ip6_addr: str + """ + with VatTerminal(node) as vat: + resp = vat.vat_terminal_exec_cmd_from_template( + 'srv6/sr_set_encaps_source.vat', ip6_addr=ip6_addr) + + VatJsonUtil.verify_vat_retval( + resp[0], + err_msg='Set SRv6 encapsulation source address {0} failed on node' + ' {1}'.format(ip6_addr, node['host'])) |