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