Performance IPv6 library and short/long test cases
[csit.git] / resources / libraries / robot / cop.robot
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:
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 | Resource | resources/libraries/robot/default.robot
16 | Resource | resources/libraries/robot/counters.robot
17 | Library | resources.libraries.python.NodePath
18 | Library | resources.libraries.python.Cop
19 | Library | resources.libraries.python.Routing
20 | Library | resources.libraries.python.TrafficScriptExecutor
21 | Library | resources.libraries.python.InterfaceUtil
22
23 *** Keywords ***
24 | Setup Nodes And Variables
25 | | [Documentation] | Setup of test variables and bring interfaces up.
26 | | ...
27 | | ... | *Arguments:*
28 | | ...
29 | | ... | - {tg_node} : Node where to start/end. Type: dictionary
30 | | ... | - {dut1_node} - Next node from start. Type: dictionary
31 | | ... | - {dut2_node} - Third node. Type: dictionary
32 | | ...
33 | | ... | *Return:*
34 | | ...
35 | | ... | - No value returned
36 | | ...
37 | | ... | *Example:*
38 | | ...
39 | | ... | \| Setup Nodes And Variables \| ${nodes['TG']} \
40 | | ... | \| ${nodes['DUT1']} \| ${nodes['DUT2']} \|
41 | | ...
42 | | ... | _NOTE:_ This KW sets following test case variables:
43 | | ...
44 | | ... | - ${tg_if1} - Iterface of TG towards DUT (1st).
45 | | ... | - ${tg_if2} - Interface of TG towards DUT (2nd).
46 | | ... | - ${dut1_if1} - Interface of DUT towards TG (1st).
47 | | ... | - ${dut1_if2} - Interface of DUT towards TG (2nd).
48 | | ... | - ${dut2_if1} - Interface of DUT2 towards DUT (1st).
49 | | ... | - ${dut2_if2} - Interface of DUT2 towards TG (2nd).
50 | | ... | - ${tg_if1_mac} - MAC address of TG interface (1st).
51 | | ... | - ${tg_if2_mac} - MAC address of TG interface (2nd).
52 | | ... | - ${dut1_if1_mac} - MAC address of DUT1 interface (1st).
53 | | ... | - ${dut1_if2_mac} - MAC address of DUT1 interface (2nd).
54 | | ...
55 | | [Arguments] | ${tg_node} | ${dut1_node} | ${dut2_node}
56 | | Append Nodes | ${tg_node} | ${dut1_node} | ${dut2_node} |
57 | | ... | ${tg_node}
58 | | Compute Path
59 | | ${tg_if1} | ${tg}= | Next Interface
60 | | ${dut1_if1} | ${dut1}= | Next Interface
61 | | ${dut1_if2} | ${dut1}= | Next Interface
62 | | ${dut2_if1} | ${dut2}= | Next Interface
63 | | ${dut2_if2} | ${dut2}= | Next Interface
64 | | ${tg_if2} | ${tg}= | Next Interface
65 | | ${tg_if1_mac}= | Get interface mac | ${tg} | ${tg_if1}
66 | | ${tg_if2_mac}= | Get interface mac | ${tg} | ${tg_if2}
67 | | ${dut1_if1_mac}= | Get interface mac | ${dut1} | ${dut1_if1}
68 | | ${dut1_if2_mac}= | Get interface mac | ${dut1} | ${dut1_if2}
69 | | Set Test Variable | ${tg_if1}
70 | | Set Test Variable | ${tg_if2}
71 | | Set Test Variable | ${dut1_if1}
72 | | Set Test Variable | ${dut1_if2}
73 | | Set Test Variable | ${dut2_if1}
74 | | Set Test Variable | ${dut2_if2}
75 | | Set Test Variable | ${tg_if1_mac}
76 | | Set Test Variable | ${tg_if2_mac}
77 | | Set Test Variable | ${dut1_if1_mac}
78 | | Set Test Variable | ${dut1_if2_mac}
79 | | Set Interface State | ${tg_node} | ${tg_if1} | up
80 | | Set Interface State | ${tg_node} | ${tg_if2} | up
81 | | Set Interface State | ${dut1_node} | ${dut1_if1} | up
82 | | Set Interface State | ${dut1_node} | ${dut1_if2} | up
83 | | Set Interface State | ${dut2_node} | ${dut2_if1} | up
84 | | Set Interface State | ${dut2_node} | ${dut2_if2} | up
85 | | All Vpp Interfaces Ready Wait | ${nodes}