1 # Copyright (c) 2016 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:
6 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 | Documentation | Keywords for VLAN tests
16 | Resource | resources/libraries/robot/default.robot
17 | Resource | resources/libraries/robot/l2_xconnect.robot
18 | Library | resources.libraries.python.L2Util
19 | Library | resources.libraries.python.InterfaceUtil
20 | Library | resources.libraries.python.NodePath
24 | VLAN subinterfaces initialized on 3-node topology
25 | | [Arguments] | ${DUT1} | ${INT1} | ${DUT2} | ${INT2} | ${SUB_ID}
26 | | ... | ${OUTER_VLAN_ID} | ${INNER_VLAN_ID} | ${TYPE_SUBIF}
27 | | [Documentation] | *Create two subinterfaces on DUTs.*
29 | | ... | *Arguments:*
30 | | ... | - ${DUT1} - Node to add sub-interface.
31 | | ... | - ${INT1} - Interface name on which create sub-interface.
32 | | ... | - ${DUT2} - Node to add sub-interface.
33 | | ... | - ${INT2} - Interface name on which create sub-interface.
34 | | ... | - ${SUB_ID} - ID of the sub-interface to be created.
35 | | ... | - ${OUTER_VLAN_ID} - Outer VLAN ID.
36 | | ... | - ${INNER_VLAN_ID} - Inner VLAN ID.
37 | | ... | - ${TYPE_SUBIF} - Type of sub-interface.
39 | | ... | _Set testcase variables with name and index of created interfaces:_
40 | | ... | - ${subif_name_1}
41 | | ... | - ${subif_index_1}
42 | | ... | - ${subif_name_2}
43 | | ... | - ${subif_index_2}
45 | | ${subif_name_1} | ${subif_index_1}= | Create subinterface | ${DUT1}
46 | | ... | ${INT1} | ${SUB_ID}
47 | | ... | ${OUTER_VLAN_ID} | ${INNER_VLAN_ID}
48 | | ... | ${TYPE_SUBIF}
49 | | ${subif_name_2} | ${subif_index_2}= | Create subinterface | ${DUT2}
50 | | ... | ${INT2} | ${SUB_ID}
51 | | ... | ${OUTER_VLAN_ID} | ${INNER_VLAN_ID}
52 | | ... | ${TYPE_SUBIF}
53 | | Set Interface State | ${DUT1} | ${subif_index_1} | up
54 | | Set Interface State | ${DUT2} | ${subif_index_2} | up
55 | | Set Test Variable | ${subif_name_1}
56 | | Set Test Variable | ${subif_index_1}
57 | | Set Test Variable | ${subif_name_2}
58 | | Set Test Variable | ${subif_index_2}
60 | VLAN dot1q subinterfaces initialized on 3-node topology
61 | | [Arguments] | ${DUT1} | ${INT1} | ${DUT2} | ${INT2} | ${SUB_ID}
62 | | [Documentation] | *Create two dot1q subinterfaces on DUTs.*
64 | | ... | *Arguments:*
65 | | ... | - ${DUT1} - Node to add sub-interface.
66 | | ... | - ${INT1} - Interface name on which create VLAN sub-interface.
67 | | ... | - ${DUT2} - Node to add sub-interface.
68 | | ... | - ${INT2} - Interface name on which create VLAN sub-interface.
69 | | ... | - ${SUB_ID} - ID of the sub-interface to be created.
71 | | ... | _Set testcase variables with name and index of created interfaces:_
72 | | ... | - ${subif_name_1}
73 | | ... | - ${subif_index_1}
74 | | ... | - ${subif_name_2}
75 | | ... | - ${subif_index_2}
79 | | ... | \| VLAN dot1q subinterfaces initialized on 3-node topology \
80 | | ... | \| ${nodes['DUT1']} \| ${dut1_if2} \| ${nodes['DUT2']} \
81 | | ... | \| ${dut1_if2} \| 10 \|
83 | | ${subif_name_1} | ${subif_index_1}= | Create Vlan Subinterface
84 | | | ... | ${DUT1} | ${INT1} | ${SUB_ID}
85 | | ${subif_name_2} | ${subif_index_2}= | Create Vlan Subinterface
86 | | | ... | ${DUT2} | ${INT2} | ${SUB_ID}
87 | | Set Interface State | ${DUT1} | ${subif_index_1} | up
88 | | Set Interface State | ${DUT2} | ${subif_index_2} | up
89 | | Set Test Variable | ${subif_name_1}
90 | | Set Test Variable | ${subif_index_1}
91 | | Set Test Variable | ${subif_name_2}
92 | | Set Test Variable | ${subif_index_2}
94 | L2 tag rewrite method setup on interfaces
95 | | [Arguments] | ${DUT1} | ${SUB_INT1} | ${DUT2} | ${SUB_INT2}
96 | | ... | ${TAG_REWRITE_METHOD}
97 | | [Documentation] | *Setup tag rewrite on sub-interfaces on DUTs.*
99 | | ... | *Arguments:*
100 | | ... | - ${DUT1} - Node to rewrite tags.
101 | | ... | - ${SUB_INT1} - Interface on which rewrite tags.
102 | | ... | - ${DUT2} - Node to rewrite tags.
103 | | ... | - ${SUB_INT2} - Interface on which rewrite tags.
104 | | ... | - ${TAG_REWRITE_METHOD} - Method of tag rewrite.
106 | | L2 tag rewrite | ${DUT1} | ${SUB_INT1} | ${TAG_REWRITE_METHOD}
107 | | L2 tag rewrite | ${DUT2} | ${SUB_INT2} | ${TAG_REWRITE_METHOD}
109 | Interfaces and VLAN sub-interfaces inter-connected using L2-xconnect
110 | | [Arguments] | ${DUT1} | ${INT1} | ${SUB_INT1}
111 | | ... | ${DUT2} | ${INT2} | ${SUB_INT2}
112 | | [Documentation] | *Add interface and subinterface to bidirectional
113 | | ... | L2-xconnect on DUTs.*
115 | | ... | *Arguments:*
116 | | ... | - ${DUT1} - Node to add bidirectional cross-connect.
117 | | ... | - ${INT1} - Interface to add to the cross-connect.
118 | | ... | - ${SUB_INT1} - Sub-interface to add to the cross-connect.
119 | | ... | - ${DUT2} - Node to add bidirectional cross-connect.
120 | | ... | - ${INT2} - Interface to add to the cross-connect.
121 | | ... | - ${SUB_INT2} - Sub-interface to add to the cross-connect.
123 | | L2 setup xconnect on DUT | ${DUT1} | ${INT1} | ${SUB_INT1}
124 | | L2 setup xconnect on DUT | ${DUT2} | ${INT2} | ${SUB_INT2}