aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/lb/load_balancer.robot
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2020-02-21 22:09:02 +0000
committerPeter Mikus <pmikus@cisco.com>2020-04-06 08:27:39 +0000
commit14a71b74b414df7616ccb5ada3d50ecb90d96bae (patch)
treebfee617c9a4b20ce4c6467ffbbe6c0a15199ba52 /resources/libraries/robot/lb/load_balancer.robot
parent8e601d0f37f715ca4ce55dded8bc27cadfe175c2 (diff)
Improve pf layer
+ Merge single/double link + Introduce _pf{n}[0] variables so we can access physical function same way as virtual function + Cleanup code by moving complex logic to python + Prepare code for multiple vf functions Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: Ic2e74a38bfa146441357de8f0916aeb638941c49
Diffstat (limited to 'resources/libraries/robot/lb/load_balancer.robot')
-rw-r--r--resources/libraries/robot/lb/load_balancer.robot109
1 files changed, 59 insertions, 50 deletions
diff --git a/resources/libraries/robot/lb/load_balancer.robot b/resources/libraries/robot/lb/load_balancer.robot
index a254acd0f8..4c358a47ba 100644
--- a/resources/libraries/robot/lb/load_balancer.robot
+++ b/resources/libraries/robot/lb/load_balancer.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2019 Intel and/or its affiliates.
+# Copyright (c) 2020 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:
@@ -37,22 +37,24 @@
| |
| | ${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
-| |
-| | Add Ip Neighbors | ${dut1} | ${dut1_if2} | 192.168.60 | ${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}
-| | Add Lb As Addresses | ${dut1} | 90.1.2.1 | 192.168.60
+| | Assign Interface To Fib Table
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | ${fib_table}
+| | Assign Interface To Fib Table
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | ${fib_table}
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 192.168.50.72 | 24
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | 192.168.60.73 | 24
+| | Add Ip Neighbors
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | 192.168.60 | ${TG_pf2_mac}[0]
+| | Vpp Route Add
+| | ... | ${dut1} | 192.168.60.0 | 24 | interface=${DUT1_${int}2}[0]
+| | 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}
+| | Add Lb As Addresses
+| | ... | ${dut1} | 90.1.2.1 | 192.168.60
| Initialize loadbalancer l3dsr
| | [Documentation]
@@ -65,22 +67,24 @@
| |
| | ${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
-| |
-| | Add Ip Neighbors | ${dut1} | ${dut1_if2} | 192.168.60 | ${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=${2} | dscp=${7}
-| | ... | new_len=${1024}
-| | Add Lb As Addresses | ${dut1} | 90.1.2.1 | 192.168.60
+| | Assign Interface To Fib Table
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | ${fib_table}
+| | Assign Interface To Fib Table
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | ${fib_table}
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 192.168.50.72 | 24
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | 192.168.60.73 | 24
+| | Add Ip Neighbors
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | 192.168.60 | ${TG_pf2_mac}[0]
+| | Vpp Route Add
+| | ... | ${dut1} | 192.168.60.0 | 24 | interface=${DUT1_${int}2}[0]
+| | 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=${2} | dscp=${7} | new_len=${1024}
+| | Add Lb As Addresses
+| | ... | ${dut1} | 90.1.2.1 | 192.168.60
| Initialize loadbalancer nat4
| | [Documentation]
@@ -93,26 +97,31 @@
| |
| | ${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
-| |
-| | Add Ip Neighbors | ${dut1} | ${dut1_if1} | 192.168.50 | ${tg_if1_mac}
-| | Add Ip Neighbors | ${dut1} | ${dut1_if2} | 192.168.60 | ${tg_if2_mac}
-| |
-| | Vpp Route Add | ${dut1} | 192.168.50.0 | 24 | interface=${dut1_if1}
-| | 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=${3}
+| | Assign Interface To Fib Table
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | ${fib_table}
+| | Assign Interface To Fib Table
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | ${fib_table}
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 192.168.50.72 | 24
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | 192.168.60.73 | 24
+| | Add Ip Neighbors
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 192.168.50 | ${TG_pf1_mac}[0]
+| | Add Ip Neighbors
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | 192.168.60 | ${TG_pf2_mac}[0]
+| | Vpp Route Add
+| | ... | ${dut1} | 192.168.50.0 | 24 | interface=${DUT1_${int}1}[0]
+| | Vpp Route Add
+| | ... | ${dut1} | 192.168.60.0 | 24 | interface=${DUT1_${int}2}[0]
+| | 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=${3}
| | ... | protocol=${17} | port=${20000} | target_port=${3307} | new_len=${1024}
| | Add Lb As Addresses
| | ... | ${dut1} | 90.1.2.1 | 192.168.60 | protocol=${17} | port=${20000}
-| | Vpp Lb Add Del Intf Nat4 | ${dut1} | interface=${dut1_if2}
+| | Vpp Lb Add Del Intf Nat4
+| | ... | ${dut1} | interface=${DUT1_${int}2}[0]
| Add Ip Neighbors
| | [Documentation] | Add IP neighbors to physical interface on DUT.