CSIT-866: wrk onboarding in CSIT
[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 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 | | ... | - ${dut1_if1_ip4} - IP address to be set on the dut1_if1 interface.
30 | | ... | Type: string
31 | | ... | - ${ip4_len} - Length of the netmask. Type: integer
32 | | ...
33 | | ... | *Example:*
34 | | ...
35 | | ... | \| Set up HTTP server on the VPP node \| 192.168.10.2 \| 24 \|
36 | | ...
37 | | [Arguments] | ${dut1_if1_ip4} | ${ip4_len}
38 | | ...
39 | | Set Interface State | ${dut1} | ${dut1_if1} | up
40 | | Set Interface Address | ${dut1} | ${dut1_if1} | ${dut1_if1_ip4} | ${ip4_len}
41 | | Vpp Node Interfaces Ready Wait | ${dut1}
42 | | Start HTTP server | ${dut1}
43 | | Sleep | 30