1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
|
# Copyright (c) 2018 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:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
*** Settings ***
| Library | resources.libraries.python.SRv6
| Documentation | Keywords for SRv6 feature in VPP.
*** Keywords ***
| Configure SR LocalSID on DUT
| | [Documentation] | Create SRv6 LocalSID and binds it to a particular\
| | ... | behavior on the given DUT node.
| | ...
| | ... | *Arguments:*
| | ... | - dut_node - DUT node where to create localSID on. Type: dictionary
| | ... | - local_sid - LocalSID IPv6 address. Type: string
| | ... | - behavior - SRv6 LocalSID function. Type: string
| | ... | - interface - Interface name (Optional, default value: None; required
| | ... | for L2/L3 xconnects). Type: string
| | ... | - next_hop - Next hop IPv4/IPv6 address (Optional, default value:
| | ... | None; required for L3 xconnects). Type: string
| | ... | - fib_table - FIB table for IPv4/IPv6 lookup (Optional, default value:
| | ... | None; required for L3 routing). Type: string
| | ...
| | ... | *Example:*
| | ...
| | ... | \| Configure SR LocalSID on DUT \| ${nodes['DUT1']} \| B:: \| end \|
| | ... | \| Configure SR LocalSID on DUT \| ${nodes['DUT1']} \| C:: \
| | ... | \| end.dx2 \| interface=GigabitEthernet0/10/0 \|
| | ... | \| Configure SR LocalSID on DUT \| ${nodes['DUT1']} \| D:: \
| | ... | \| end.dx4 \| interface=GigabitEthernet0/8/0 \| next_hop=10.0.0.1 \|
| | ... | \| Configure SR LocalSID on DUT \| ${nodes['DUT2']} \| E:: \
| | ... | \| end.dt6 \| fib_table=2 \|
| | ...
| | [Arguments] | ${dut_node} | ${local_sid} | ${behavior}
| | ... | ${interface}=${None} | ${next_hop}=${None} | ${fib_table}=${None}
| | ...
| | Configure SR LocalSID | ${dut_node} | ${local_sid} | ${behavior}
| | ... | interface=${interface} | next_hop=${next_hop} | fib_table=${fib_table}
| Delete SR LocalSID on DUT
| | [Documentation] | Delete SRv6 LocalSID on the given DUT node.
| | ...
| | ... | *Arguments:*
| | ... | - dut_node - DUT node where to delete localSID on. Type: dictionary
| | ... | - local_sid - LocalSID IPv6 address. Type: string
| | ...
| | ... | *Example:*
| | ...
| | ... | \| Delete SR LocalSID on DUT \| ${nodes['DUT1']} \| B:: \|
| | ...
| | [Arguments] | ${dut_node} | ${local_sid}
| | ...
| | Delete SR LocalSID | ${dut_node} | ${local_sid}
| Show SR LocalSIDs on DUT
| | [Documentation] | Show SRv6 LocalSIDs on the given DUT node.
| | ...
| | ... | *Arguments:*
| | ... | - dut_node - DUT node where to show SR localSIDs on. Type: dictionary
| | ...
| | ... | *Example:*
| | ...
| | ... | \| Show SR LocalSIDs on DUT \| ${nodes['DUT1']} \|
| | ...
| | [Arguments] | ${dut_node}
| | ...
| | Show SR LocalSIDs | ${dut_node}
| Configure SR Policy on DUT
| | [Documentation] | Create SRv6 policy on the given DUT node.
| | ...
| | ... | *Arguments:*
| | ... | - dut_node - DUT node where to create SRv6 policy on. Type: dictionary
| | ... | - bsid - BindingSID - local SID IPv6 address. Type: string
| | ... | - mode - Encapsulation / insertion mode (Optional, default value:
| | ... | encap). Type: string
| | ... | - sid_list - SID list. Type: list
| | ...
| | ... | *Example:*
| | ...
| | ... | \| Configure SR Policy on DUT \| ${nodes['DUT2']} \| D:: \
| | ... | \| mode=insert \| E::\| F:: \|
| | ...
| | [Arguments] | ${dut_node} | ${bsid} | ${mode}=encap | @{sid_list}
| | ...
| | Configure SR Policy | ${dut_node} | ${bsid} | @{sid_list} | mode=${mode}
| Delete SR Policy on DUT
| | [Documentation] | Delete SRv6 policy on the given DUT node.
| | ...
| | ... | *Arguments:*
| | ... | - dut_node - DUT node where to delete SRv6 policy on. Type: dictionary
| | ... | - bsid - BindingSID - local SID IPv6 address. Type: string
| | ...
| | ... | *Example:*
| | ...
| | ... | \| Delete SR Policy on DUT \| ${nodes['DUT1']} \| A:: \|
| | ...
| | [Arguments] | ${dut_node} | ${bsid}
| | ...
| | Delete SR Policy | ${dut_node} | ${bsid}
| Show SR Policies on DUT
| | [Documentation] | Show SRv6 policies on the given DUT node.
| | ...
| | ... | *Arguments:*
| | ... | - dut_node - DUT node where to show SR policies on. Type: dictionary
| | ...
| | ... | *Example:*
| | ...
| | ... | \| Show SR Policies on DUT \| ${nodes['DUT1']} \|
| | ...
| | [Arguments] | ${dut_node}
| | ...
| | Show SR Policies | ${dut_node}
| Configure SR Steer on DUT
| | [Documentation] | Create SRv6 steering policy on the given DUT node.
| | ...
| | ... | *Arguments:*
| | ... | - dut_node - DUT node where to create SR steering policy on.
| | ... | Type: dictionary
| | ... | - mode - Mode of operation - L2 or L3. Type: string
| | ... | - bsid - BindingSID - local SID IPv6 address. Type: string
| | ... | - interface - Interface name (Optional, default value: None; required
| | ... | in case of L2 mode). Type: string
| | ... | - ip_addr - IPv4/IPv6 address (Optional, default value: None; required
| | ... | in case of L3 mode). Type: string
| | ... | - prefix - IP address prefix (Optional, default value: None; required
| | ... | for L3 mode). Type: integer
| | ...
| | ... | *Example:*
| | ...
| | ... | \| Configure SR Steer on DUT \| ${nodes['DUT1']} \| L2 \| B:: \
| | ... | \| interface=GigabitEthernet0/10/0 \|
| | ... | \| Configure SR Steer on DUT \| ${nodes['DUT1']} \| L3 \| C:: \
| | ... | \| ip_address=2001::1 \| prefix=64 \|
| | ...
| | [Arguments] | ${dut_node} | ${mode} | ${bsid}
| | ... | ${interface}=${None} | ${ip_addr}=${None} | ${prefix}=${None}
| | ...
| | Configure SR Steer | ${dut_node} | ${mode} | ${bsid}
| | ... | interface=${interface} | ip_addr=${ip_addr} | prefix=${prefix}
| Delete SR Steer on DUT
| | [Documentation] | Delete SRv6 steering policy on the given DUT node.
| | ...
| | ... | *Arguments:*
| | ... | - dut_node - DUT node where to delete SR steering policy on.
| | ... | Type: dictionary
| | ... | - mode - Mode of operation - L2 or L3. Type: string
| | ... | - bsid - BindingSID - local SID IPv6 address. Type: string
| | ... | - interface - Interface name (Optional, default value: None; required
| | ... | in case of L2 mode). Type: string
| | ... | - ip_addr - IPv4/IPv6 address (Optional, default value: None; required
| | ... | in case of L3 mode). Type: string
| | ... | - prefix - IP address prefix (Optional, default value: None; required
| | ... | for L3 mode). Type: integer
| | ...
| | ... | *Example:*
| | ...
| | ... | \| Delete SR Steer on DUT \| ${nodes['DUT1']} \| L2 \| B:: \
| | ... | \| interface=GigabitEthernet0/10/0 \|
| | ... | \| Delete SR Steer on DUT \| ${nodes['DUT1']} \| L3 \| C:: \
| | ... | \| ip_address=2001::1 \| prefix=64 \|
| | ...
| | [Arguments] | ${dut_node} | ${mode} | ${bsid}
| | ... | ${interface}=${None} | ${ip_addr}=${None} | ${prefix}=${None}
| | ...
| | Delete SR Steer | ${dut_node} | ${mode} | ${bsid}
| | ... | interface=${interface} | ip_addr=${ip_addr} | prefix=${prefix}
| Show SR Steering Policies on DUT
| | [Documentation] | Show SRv6 steering policies on the given DUT node.
| | ...
| | ... | *Arguments:*
| | ... | - dut_node - DUT node where to show SR steering policies on.
| | ... | Type: dictionary
| | ...
| | ... | *Example:*
| | ...
| | ... | \| Show SR Steering Policies on DUT \| ${nodes['DUT1']} \|
| | ...
| | [Arguments] | ${dut_node}
| | ...
| | Show SR Steering Policies | ${dut_node}
| Set SR Encaps Source Address on DUT
| | [Documentation] | Set SRv6 encapsulation source address on the given DUT
| | ... | node.
| | ...
| | ... | *Arguments:*
| | ... | - dut_node - DUT node where to set SRv6 encapsulation source address
| | ... | on. Type: dictionary
| | ... | - ip6_addr - Local SID IPv6 address. Type: string
| | ...
| | ... | *Example:*
| | ...
| | ... | \| Set SR Encaps Source Address on DUT \| ${nodes['DUT1']} \| B:: \|
| | ...
| | [Arguments] | ${dut_node} | ${ip6_addr}
| | ...
| | Set SR Encaps Source Address | ${dut_node} | ip6_addr=${ip6_addr}
|