CSIT-898: WRK improvments
[csit.git] / resources / libraries / robot / tcp / tcp_setup.robot
1 # Copyright (c) 2018 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.IPv4Util.IPv4Util
16 | Library | resources.libraries.python.InterfaceUtil
17 | Library | resources.libraries.python.tcp.TCPUtils
18 | Resource | resources/libraries/robot/ip/ip4.robot
19 | ...
20 | Documentation | L2 keywords to set up VPP to test tcp.
21
22 *** Keywords ***
23 | Set up HTTP server with paramters on the VPP node
24 | | [Documentation]
25 | | ... | Configure IP address on the port, set it up and start HTTP server on
26 | | ... | the VPP.
27 | | ...
28 | | ... | *Arguments:*
29 | | ... | - ${prealloc_fifos} - Max number of connections you expect to handle
30 | | ... | at one time. Type: string
31 | | ... | - ${fifo_size} - FIFO size in kB. Type: string
32 | | ... | - ${private_segment_size} - Private segment size. Number + unit.
33 | | ... | Type: string
34 | | ...
35 | | ... | *Example:*
36 | | ...
37 | | ... | \| Set up HTTP server with paramters on the VPP node \| 400 \| 4096\
38 | | ... | \| 2g \|
39 | | ...
40 | | [Arguments] | ${prealloc_fifos} | ${fifo_size} | ${private_segment_size}
41 | | ...
42 | | Set Interface State | ${dut1} | ${dut1_if1} | up
43 | | Set Interface Address | ${dut1} | ${dut1_if1} | 192.168.10.2 | 24
44 | | Set Interface Address | ${dut1} | ${dut1_if1} | 192.168.20.2 | 24
45 | | Set Interface Address | ${dut1} | ${dut1_if1} | 192.168.30.2 | 24
46 | | Set Interface Address | ${dut1} | ${dut1_if1} | 192.168.40.2 | 24
47 | | Set Interface Address | ${dut1} | ${dut1_if1} | 192.168.50.2 | 24
48 | | Set Interface Address | ${dut1} | ${dut1_if1} | 192.168.60.2 | 24
49 | | Set Interface Address | ${dut1} | ${dut1_if1} | 192.168.70.2 | 24
50 | | Set Interface Address | ${dut1} | ${dut1_if1} | 192.168.80.2 | 24
51 | | Vpp Node Interfaces Ready Wait | ${dut1}
52 | | Start HTTP server params | ${dut1} | ${prealloc_fifos} | ${fifo_size}
53 | | ... | ${private_segment_size}
54 | | Sleep | 30