Add vpp loadbalancer maglev mode test suite
[csit.git] / resources / libraries / robot / lb / load_balancer.robot
1 # Copyright (c) 2019 Intel 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 | Collections
16 | Library | String
17
18 | Library | resources.libraries.python.InterfaceUtil
19 | Library | resources.libraries.python.IPUtil
20 | Library | resources.libraries.python.topology.Topology
21 | Library | resources.libraries.python.LoadBalancerUtil
22 | Library | resources.libraries.python.NodePath
23 | ...
24 | Resource | resources/libraries/robot/shared/interfaces.robot
25 | ...
26 | Documentation | LoadBalancer suite keywords - configuration
27
28 *** Keywords ***
29 | Initialize loadbalancer maglev
30 | | [Documentation]
31 | | ... | Set UP state on VPP interfaces in path on nodes in 2-node
32 | | ... | circular topology. Get the interface MAC addresses and setup ARP on
33 | | ... | all VPP interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG
34 | | ... | links.
35 | | ...
36 | | Set interfaces in path up
37 | | ...
38 | | ${fib_table}= | Set Variable | ${0}
39 | | Add Fib Table | ${dut1} | ${fib_table}
40 | | Assign Interface To Fib Table | ${dut1} | ${dut1_if1} | ${fib_table}
41 | | Assign Interface To Fib Table | ${dut1} | ${dut1_if2} | ${fib_table}
42 | | ...
43 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if1}
44 | | ... | 192.168.50.72 | 24
45 | | VPP Interface Set IP Address | ${dut1} | ${dut1_if2}
46 | | ... | 192.168.60.73 | 24
47 | | ...
48 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 192.168.60.74 | ${tg_if2_mac}
49 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 192.168.60.75 | ${tg_if2_mac}
50 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 192.168.60.76 | ${tg_if2_mac}
51 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 192.168.60.77 | ${tg_if2_mac}
52 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 192.168.60.78 | ${tg_if2_mac}
53 | | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 192.168.60.79 | ${tg_if2_mac}
54 | | ...
55 | | Vpp Route Add | ${dut1} | 192.168.60.0 | 24 | interface=${dut1_if2}
56 | | ...
57 | | Vpp Lb Conf | ${dut1} | ip4_src_addr=192.168.60.73 | buckets_per_core=${128}
58 | | Vpp Lb Add Del Vip | ${dut1} | vip_addr=90.1.2.1 | encap=${0} | new_len=${1024}
59 | | Vpp Lb Add Del As | ${dut1} | vip_addr=90.1.2.1 | as_addr=192.168.60.74
60 | | Vpp Lb Add Del As | ${dut1} | vip_addr=90.1.2.1 | as_addr=192.168.60.75
61 | | Vpp Lb Add Del As | ${dut1} | vip_addr=90.1.2.1 | as_addr=192.168.60.76
62 | | Vpp Lb Add Del As | ${dut1} | vip_addr=90.1.2.1 | as_addr=192.168.60.77
63 | | Vpp Lb Add Del As | ${dut1} | vip_addr=90.1.2.1 | as_addr=192.168.60.78
64 | | Vpp Lb Add Del As | ${dut1} | vip_addr=90.1.2.1 | as_addr=192.168.60.79