Add Honeycomb persistence tests
[csit.git] / resources / libraries / robot / default.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 | Variables | resources/libraries/python/topology.py
16 | Library | resources.libraries.python.topology.Topology
17 | Library | resources.libraries.python.DUTSetup
18 | Library | resources.libraries.python.TGSetup
19 | Library | resources/libraries/python/VppConfigGenerator.py
20 | Library | Collections
21
22 *** Keywords ***
23 | Setup all DUTs before test
24 | | [Documentation] | Setup all DUTs in topology before test execution
25 | | Setup All DUTs | ${nodes}
26
27 | Setup all TGs before traffic script
28 | | [Documentation] | Prepare all TGs before traffic scripts execution
29 | | All TGs Set Interface Default Driver | ${nodes}
30
31 | Add '${m}' worker threads and rss '${n}' without HTT to all DUTs
32 | | [Documentation] |  Setup M worker threads without HTT and rss N in startup
33 | | ...             |  configuration of VPP to all DUTs
34 | | ${cpu}= | Catenate | main-core | 0 | corelist-workers
35 | | ${cpu}= | Run Keyword If | '${m}' == '1' | Catenate | ${cpu} | 1
36 | | ...     | ELSE IF        | '${m}' == '2' | Catenate | ${cpu} | 1-2
37 | | ...     | ELSE IF        | '${m}' == '4' | Catenate | ${cpu} | 1-4
38 | | ...     | ELSE IF        | '${m}' == '6' | Catenate | ${cpu} | 1-6
39 | | ...     | ELSE           | Fail | Not supported combination
40 | | ${rss}= | Catenate | rss | ${n}
41 | | Add worker threads and rss to all DUTs | ${cpu} | ${rss}
42
43 | Add '${m}' worker threads and rss '${n}' with HTT to all DUTs
44 | | [Documentation] |  Setup M worker threads with HTT and rss N in startup
45 | | ...             |  configuration of VPP to all DUTs
46 | | ${cpu}= | Catenate | main-core | 0 | corelist-workers
47 | | ${cpu}= | Run Keyword If | '${m}' == '2' | Catenate | ${cpu} | 1,10
48 | | ...     | ELSE IF        | '${m}' == '4' | Catenate | ${cpu} | 1-2,10-11
49 | | ...     | ELSE IF        | '${m}' == '6' | Catenate | ${cpu} | 1-3,10-12
50 | | ...     | ELSE IF        | '${m}' == '8' | Catenate | ${cpu} | 1-4,10-13
51 | | ...     | ELSE           | Fail | Not supported combination
52 | | ${rss}= | Catenate | rss | ${n}
53 | | Add worker threads and rss to all DUTs | ${cpu} | ${rss}
54
55 | Add worker threads and rss to all DUTs
56 | | [Documentation] | Setup worker threads and rss in VPP startup configuration
57 | | ...             | to all DUTs
58 | | ...
59 | | ... | *Arguments:*
60 | | ... | - ${cpu} - CPU configuration. Type: string
61 | | ... | - ${rss} - RSS configuration. Type: string
62 | | ...
63 | | ... | *Example:*
64 | | ...
65 | | ... | \| Add worker threads and rss to all DUTs \| main-core 0 \
66 | | ... | \| rss 2
67 | | [Arguments] | ${cpu} | ${rss}
68 | | ${duts}= | Get Matches | ${nodes} | DUT*
69 | | :FOR | ${dut} | IN | @{duts}
70 | | | Add CPU config | ${nodes['${dut}']}
71 | | | ...            | ${cpu}
72 | | | Add RSS config | ${nodes['${dut}']}
73 | | | ...            | ${rss}
74
75 | Add all PCI devices to all DUTs
76 | | [Documentation] | Add all available PCI devices from topology file to VPP
77 | | ...             | startup configuration to all DUTs
78 | | ${duts}= | Get Matches | ${nodes} | DUT*
79 | | :FOR | ${dut} | IN | @{duts}
80 | | | Add PCI device | ${nodes['${dut}']}
81
82 | Add PCI device to DUT
83 | | [Documentation] | Add PCI device to VPP startup configuration
84 | | ...             | to DUT specified as argument
85 | | ...
86 | | ... | *Arguments:*
87 | | ... | - ${node} - DUT node. Type: dictionary
88 | | ... | - ${pci_address} - PCI address. Type: string
89 | | ...
90 | | ... | *Example:*
91 | | ...
92 | | ... | \| Add PCI device to DUT \| ${nodes['DUT1']} \
93 | | ... | \| 0000:00:00.0
94 | | [Arguments] | ${node} | ${pci_address}
95 | | Add PCI device | ${node} | ${pci_address}
96
97 | Add No Multi Seg to all DUTs
98 | | [Documentation] | Add No Multi Seg to VPP startup configuration to all
99 | | ...             | DUTs
100 | | ${duts}= | Get Matches | ${nodes} | DUT*
101 | | :FOR | ${dut} | IN | @{duts}
102 | | | Add No Multi Seg Config | ${nodes['${dut}']}
103
104 | Add Max Tx Queues '${m}' to all DUTs
105 | | [Documentation] | Add Max Tx Queues M to VPP startup configuration to all
106 | | ...             | DUTs
107 | | ${queues}= | Catenate | max-tx-queues | ${m}
108 | | ${duts}= | Get Matches | ${nodes} | DUT*
109 | | :FOR | ${dut} | IN | @{duts}
110 | | | Add Max Tx Queues Config | ${nodes['${dut}']} | ${queues}
111
112 | Remove startup configuration of VPP from all DUTs
113 | | [Documentation] | Remove VPP startup configuration from all DUTs
114 | | ${duts}= | Get Matches | ${nodes} | DUT*
115 | | :FOR | ${dut} | IN | @{duts}
116 | | | Remove All PCI Devices | ${nodes['${dut}']}
117 | | | Remove All CPU Config | ${nodes['${dut}']}
118 | | | Remove Socketmem Config | ${nodes['${dut}']}
119 | | | Remove Heapsize Config | ${nodes['${dut}']}
120 | | | Remove RSS Config | ${nodes['${dut}']}
121 | | | Remove Max Tx Queues Config | ${nodes['${dut}']}
122 | | | Remove No Multi Seg Config | ${nodes['${dut}']}
123
124 | Setup default startup configuration of VPP on all DUTs
125 | | [Documentation] | Setup default startup configuration of VPP to all DUTs
126 | | Remove startup configuration of VPP from all DUTs
127 | | Add '1' worker threads and rss '1' without HTT to all DUTs
128 | | Add all PCI devices to all DUTs
129 | | Apply startup configuration on all VPP DUTs
130
131 | Apply startup configuration on all VPP DUTs
132 | | [Documentation] | Apply startup configuration of VPP and restart VPP on all
133 | | ...             | DUTs
134 | | ${duts}= | Get Matches | ${nodes} | DUT*
135 | | :FOR | ${dut} | IN | @{duts}
136 | | | Apply Config | ${nodes['${dut}']}