VPPD: VXLAN
[csit.git] / resources / libraries / robot / l2 / l2_xconnect.robot
1 # Copyright (c) 2019 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Library | resources.libraries.python.L2Util
16 | Library | resources.libraries.python.InterfaceUtil
17
18 *** Keywords ***
19 | Configure L2XC
20 | | [Documentation] | Setup Bidirectional Cross Connect on DUTs
21 | | [Arguments] | ${node} | ${if1} | ${if2} |
22 | | Set Interface State | ${node} | ${if1} | up
23 | | Set Interface State | ${node} | ${if2} | up
24 | | Vpp Setup Bidirectional Cross Connect | ${node} | ${if1} | ${if2}
25
26 | Initialize L2 cross connect on node
27 | | [Documentation]
28 | | ... | Setup L2 cross connect topology by connecting RX/TX of two interfaces
29 | | ... | on each DUT. Interfaces are brought up.
30 | | ...
31 | | ... | *Arguments:*
32 | | ... | - dut - DUT node. Type: string
33 | | ... | - count - Number of interfaces pairs to connect. Type: integer
34 | | ...
35 | | ... | *Example:*
36 | | ...
37 | | ... | \| Initialize L2 cross connect on node \| DUT1 \| 1 \|
38 | | ...
39 | | [Arguments] | ${dut} | ${count}=${1}
40 | | ...
41 | | :FOR | ${id} | IN RANGE | 1 | ${count} + 1
42 | | | ${dut_str}= | Convert To Lowercase | ${dut}
43 | | | Vpp Setup Bidirectional Cross Connect | ${nodes['${dut}']}
44 | | | ... | ${${dut_str}_${prev_layer}_${id}_1}
45 | | | ... | ${${dut_str}_${prev_layer}_${id}_2}
46
47 | Initialize L2 cross connect
48 | | [Documentation]
49 | | ... | Setup L2 cross connect topology by connecting RX/TX of two interfaces
50 | | ... | on each DUT. Interfaces are brought up.
51 | | ...
52 | | ... | *Arguments:*
53 | | ... | - count - Number of interfaces pairs to connect. Type: integer
54 | | ...
55 | | ... | *Example:*
56 | | ...
57 | | ... | \| Initialize L2 cross connect \| 1 \|
58 | | ...
59 | | [Arguments] | ${count}=${1}
60 | | ...
61 | | :FOR | ${dut} | IN | @{duts}
62 | | | Initialize L2 cross connect on node | ${dut} | count=${count}