From 18479deef4bc6fba143492f538cd4139c38e44ab Mon Sep 17 00:00:00 2001 From: "haiyanX1.zhang" Date: Tue, 17 Sep 2019 03:00:26 +0000 Subject: Add vpp loadbalancer maglev mode test suite Change-Id: I61555ba566efef0a2151db9a30bf7f5d9ccad1df Signed-off-by: haiyanx1.zhang --- resources/libraries/robot/lb/load_balancer.robot | 64 ++++++++++++++++++++++++ resources/libraries/robot/shared/default.robot | 1 + 2 files changed, 65 insertions(+) create mode 100644 resources/libraries/robot/lb/load_balancer.robot (limited to 'resources/libraries/robot') diff --git a/resources/libraries/robot/lb/load_balancer.robot b/resources/libraries/robot/lb/load_balancer.robot new file mode 100644 index 0000000000..4dc66447d2 --- /dev/null +++ b/resources/libraries/robot/lb/load_balancer.robot @@ -0,0 +1,64 @@ +# Copyright (c) 2019 Intel and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +*** Settings *** +| Library | Collections +| Library | String + +| Library | resources.libraries.python.InterfaceUtil +| Library | resources.libraries.python.IPUtil +| Library | resources.libraries.python.topology.Topology +| Library | resources.libraries.python.LoadBalancerUtil +| Library | resources.libraries.python.NodePath +| ... +| Resource | resources/libraries/robot/shared/interfaces.robot +| ... +| Documentation | LoadBalancer suite keywords - configuration + +*** Keywords *** +| Initialize loadbalancer maglev +| | [Documentation] +| | ... | Set UP state on VPP interfaces in path on nodes in 2-node +| | ... | circular topology. Get the interface MAC addresses and setup ARP on +| | ... | all VPP interfaces. Setup IPv4 addresses with /24 prefix on DUT-TG +| | ... | links. +| | ... +| | Set interfaces in path up +| | ... +| | ${fib_table}= | Set Variable | ${0} +| | Add Fib Table | ${dut1} | ${fib_table} +| | Assign Interface To Fib Table | ${dut1} | ${dut1_if1} | ${fib_table} +| | Assign Interface To Fib Table | ${dut1} | ${dut1_if2} | ${fib_table} +| | ... +| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} +| | ... | 192.168.50.72 | 24 +| | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} +| | ... | 192.168.60.73 | 24 +| | ... +| | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 192.168.60.74 | ${tg_if2_mac} +| | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 192.168.60.75 | ${tg_if2_mac} +| | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 192.168.60.76 | ${tg_if2_mac} +| | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 192.168.60.77 | ${tg_if2_mac} +| | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 192.168.60.78 | ${tg_if2_mac} +| | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 192.168.60.79 | ${tg_if2_mac} +| | ... +| | Vpp Route Add | ${dut1} | 192.168.60.0 | 24 | interface=${dut1_if2} +| | ... +| | Vpp Lb Conf | ${dut1} | ip4_src_addr=192.168.60.73 | buckets_per_core=${128} +| | Vpp Lb Add Del Vip | ${dut1} | vip_addr=90.1.2.1 | encap=${0} | new_len=${1024} +| | Vpp Lb Add Del As | ${dut1} | vip_addr=90.1.2.1 | as_addr=192.168.60.74 +| | Vpp Lb Add Del As | ${dut1} | vip_addr=90.1.2.1 | as_addr=192.168.60.75 +| | Vpp Lb Add Del As | ${dut1} | vip_addr=90.1.2.1 | as_addr=192.168.60.76 +| | Vpp Lb Add Del As | ${dut1} | vip_addr=90.1.2.1 | as_addr=192.168.60.77 +| | Vpp Lb Add Del As | ${dut1} | vip_addr=90.1.2.1 | as_addr=192.168.60.78 +| | Vpp Lb Add Del As | ${dut1} | vip_addr=90.1.2.1 | as_addr=192.168.60.79 diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot index c560dcf8c2..36460d1ab9 100644 --- a/resources/libraries/robot/shared/default.robot +++ b/resources/libraries/robot/shared/default.robot @@ -41,6 +41,7 @@ | Library | resources.libraries.python.VppCounters | Library | resources.libraries.python.VPPUtil | ... +| Resource | resources/libraries/robot/lb/load_balancer.robot | Resource | resources/libraries/robot/crypto/ipsec.robot | Resource | resources/libraries/robot/features/acl.robot | Resource | resources/libraries/robot/features/gbp.robot -- cgit 1.2.3-korg