aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/lb/load_balancer.robot
diff options
context:
space:
mode:
authorJan Gelety <jgelety@cisco.com>2019-11-12 05:27:43 +0100
committerJan Gelety <jgelety@cisco.com>2019-11-28 18:26:21 +0100
commitd68951ac245150eeefa6e0f4156e4c1b5c9e9325 (patch)
tree487554a7547218d27f0a61ec02b70502c32cdcb4 /resources/libraries/robot/lb/load_balancer.robot
parented0258a440cfad7023d643f717ab78ac568dc59b (diff)
Python3: resources and libraries
Change-Id: I1392c06b1d64f62b141d24c0d42a8e36913b15e2 Signed-off-by: Jan Gelety <jgelety@cisco.com>
Diffstat (limited to 'resources/libraries/robot/lb/load_balancer.robot')
-rw-r--r--resources/libraries/robot/lb/load_balancer.robot64
1 files changed, 33 insertions, 31 deletions
diff --git a/resources/libraries/robot/lb/load_balancer.robot b/resources/libraries/robot/lb/load_balancer.robot
index 42cac6ae2e..a254acd0f8 100644
--- a/resources/libraries/robot/lb/load_balancer.robot
+++ b/resources/libraries/robot/lb/load_balancer.robot
@@ -20,9 +20,9 @@
| 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 ***
@@ -32,23 +32,23 @@
| | ... | 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
-| | ...
+| |
| | 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}
@@ -60,23 +60,23 @@
| | ... | 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
-| | ...
+| |
| | 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}
@@ -88,25 +88,25 @@
| | ... | 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
-| | ...
+| |
| | 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}
| | ... | protocol=${17} | port=${20000} | target_port=${3307} | new_len=${1024}
@@ -116,26 +116,27 @@
| Add Ip Neighbors
| | [Documentation] | Add IP neighbors to physical interface on DUT.
-| | ...
+| |
| | ... | *Arguments:*
| | ... | - node - VPP node. Type: dictionary
| | ... | - interface - Interface key. Type: string
| | ... | - ip_addr - IP address of the interface. Type: string
| | ... | - mac_addr - MAC address of the interface. Type: string
-| | ...
+| |
| | ... | *Example:*
| | ... | \| Add Ip Neighbors \| ${dut1} \| ${dut1_if1} \| 192.168.50 \
| | ... | \| ${tg_if1_mac}
-| | ...
+| |
| | [Arguments] | ${node} | ${interface} | ${ip_addr} | ${mac_addr}
-| | ...
-| | :FOR | ${number} | IN RANGE | 74 | 80
+| |
+| | FOR | ${number} | IN RANGE | 74 | 80
| | | VPP Add IP Neighbor
| | | ... | ${node} | ${interface} | ${ip_addr}.${number} | ${mac_addr}
+| | END
| Add Lb As Addresses
| | [Documentation] | Add Lb As Addresses on Vpp node.
-| | ...
+| |
| | ... | *Arguments:*
| | ... | - node - VPP node. Type: dictionary
| | ... | - vip_addr - IPv4 address to be used as source for IPv4 traffic.
@@ -143,18 +144,19 @@
| | ... | - as_addr - The application server address. Type: string
| | ... | - protocol - tcp or udp. Type: integer
| | ... | - port - destination port. Type: integer
-| | ... | - is_del - 1 if the VIP should be removed otherwise 0. Type: integer
+| | ... | - is_del - 1 if the VIP should be removed otherwise 0. Type: integer
| | ... | - is_flush - 1 if the sessions related to this AS should be flushed
| | ... | otherwise 0. Type: integer
-| | ...
+| |
| | ... | *Example:*
| | ... | \| Add Lb As Addresses \| ${dut1} \| 90.1.2.1 \| 192.168.60 \
| | ... | \| protocol=${17} \| port=${20000} \|
-| | ...
+| |
| | [Arguments] | ${node} | ${vip_addr} | ${as_addr} | ${protocol}=${255}
| | ... | ${port}=${0} | ${is_del}=${0} | ${is_flush}=${0}
-| | ...
-| | :FOR | ${number} | IN RANGE | 74 | 80
+| |
+| | FOR | ${number} | IN RANGE | 74 | 80
| | | VPP Lb Add Del As
| | | ... | ${node} | vip_addr=${vip_addr} | protocol=${protocol}
| | | ... | port=${port} | as_addr=${as_addr}.${number}
+| | END