diff options
Diffstat (limited to 'resources/libraries/robot/overlay')
-rw-r--r-- | resources/libraries/robot/overlay/gtpu.robot | 75 | ||||
-rw-r--r-- | resources/libraries/robot/overlay/lisp.robot | 6 | ||||
-rw-r--r-- | resources/libraries/robot/overlay/lisp_api.robot | 2 | ||||
-rw-r--r-- | resources/libraries/robot/overlay/lispgpe.robot | 2 | ||||
-rw-r--r-- | resources/libraries/robot/overlay/srv6.robot | 12 | ||||
-rw-r--r-- | resources/libraries/robot/overlay/vxlan.robot | 2 |
6 files changed, 84 insertions, 15 deletions
diff --git a/resources/libraries/robot/overlay/gtpu.robot b/resources/libraries/robot/overlay/gtpu.robot new file mode 100644 index 0000000000..be82ca0fd5 --- /dev/null +++ b/resources/libraries/robot/overlay/gtpu.robot @@ -0,0 +1,75 @@ +# Copyright (c) 2022 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 | resources.libraries.python.InterfaceUtil +| Library | resources.libraries.python.IPUtil +| +| Documentation | GTPU keywords. + +*** Keywords *** +| Initialize IP4 forwarding with GTPU tunnel in 3-node circular topology +| | [Documentation] +| | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular +| | ... | topology. Create GTPU tunnel on both DUT nodes, setup IPv4 adresses +| | ... | with /30 prefix on DUT1-DUT2 link, and set routing on both DUT nodes +| | ... | with prefix /24 and next hop of neighbour DUT interface. Gtpu offload +| | ... | rx will be enabled on both DUT nodes if offload is set to true. +| | +| | ... | *Arguments:* +| | ... | - offload - False or True. Type: bool +| | +| | [Arguments] | ${offload}=${False} +| | +| | VPP Interface Set IP Address | ${dut1} | ${DUT1_${int}1}[0] +| | ... | 10.10.10.1 | 24 +| | VPP Interface Set IP Address | ${dut1} | ${DUT1_${int}2}[0] +| | ... | 1.1.1.2 | 30 +| | VPP Interface Set IP Address | ${dut2} | ${DUT2_${int}1}[0] +| | ... | 1.1.1.1 | 30 +| | VPP Interface Set IP Address | ${dut2} | ${DUT2_${int}2}[0] +| | ... | 20.20.20.1 | 24 +| | +| | VPP Add IP Neighbor +| | ... | ${dut1} | ${DUT1_${int}1}[0] | 10.10.10.2 | ${TG_pf1_mac}[0] +| | VPP Add IP Neighbor +| | ... | ${dut1} | ${DUT1_${int}2}[0] | 1.1.1.1 | ${DUT2_${int}1_mac}[0] +| | VPP Add IP Neighbor +| | ... | ${dut2} | ${DUT2_${int}1}[0] | 1.1.1.2 | ${DUT1_${int}2_mac}[0] +| | VPP Add IP Neighbor +| | ... | ${dut2} | ${DUT2_${int}2}[0] | 20.20.20.2 | ${TG_pf2_mac}[0] +| | +| | ${dut1_tunnel_if_index}= | Create GTPU Tunnel Interface | ${dut1} +| | ... | source_ip=1.1.1.2 | destination_ip=1.1.1.1 | teid=${10} +| | ${dut2_tunnel_if_index}= | Create GTPU Tunnel Interface | ${dut2} +| | ... | source_ip=1.1.1.1 | destination_ip=1.1.1.2 | teid=${10} +| | +| | Set Interface State | ${dut1} | ${dut1_tunnel_if_index} | up +| | Set Interface State | ${dut2} | ${dut2_tunnel_if_index} | up +| | +| | VPP Interface Set IP Address | ${dut1} | ${dut1_tunnel_if_index} +| | ... | 10.10.1.2 | 24 +| | VPP Interface Set IP Address | ${dut2} | ${dut2_tunnel_if_index} +| | ... | 10.10.1.1 | 24 +| | +| | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | gateway=1.1.1.2 +| | ... | interface=${dut1_tunnel_if_index} +| | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | gateway=1.1.1.1 +| | ... | interface=${dut2_tunnel_if_index} +| | +| | Run keyword if | ${offload} == ${True} +| | ... | Vpp Enable GTPU Offload rx +| | ... | ${dut1} | ${DUT1_${int}2}[0] | ${dut1_tunnel_if_index} +| | Run keyword if | ${offload} == ${True} +| | ... | Vpp Enable GTPU Offload rx +| | ... | ${dut2} | ${DUT2_${int}1}[0] | ${dut2_tunnel_if_index} diff --git a/resources/libraries/robot/overlay/lisp.robot b/resources/libraries/robot/overlay/lisp.robot index 21036dc0c0..820a232338 100644 --- a/resources/libraries/robot/overlay/lisp.robot +++ b/resources/libraries/robot/overlay/lisp.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Cisco and/or its affiliates. +# Copyright (c) 2021 Cisco 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: @@ -339,13 +339,13 @@ | | VPP Add IP Neighbor | | ... | ${dut1} | ${DUT1_${int}1}[0] | 2001:1::2 | ${TG_pf1_mac}[0] | | VPP Add IP Neighbor -| | ... | ${dut2} | ${DUT2_${int}1}[0] | 2001:2::2 | ${TG_pf2_mac}[0] -| | VPP Add IP Neighbor | | ... | ${dut1} | ${DUT1_${int}2}[0] | ${dut2_dut1_address} | | ... | ${DUT2_${int}1_mac}[0] | | VPP Add IP Neighbor | | ... | ${dut2} | ${DUT2_${int}1}[0] | ${dut1_dut2_address} | | ... | ${DUT1_${int}2_mac}[0] +| | VPP Add IP Neighbor +| | ... | ${dut2} | ${DUT2_${int}2}[0] | 2001:2::2 | ${TG_pf2_mac}[0] | Initialize LISP IPv4 over IPv6 forwarding in 3-node circular topology | | [Documentation] | Custom setup of IPv4 over IPv6 topology on all DUT nodes \ diff --git a/resources/libraries/robot/overlay/lisp_api.robot b/resources/libraries/robot/overlay/lisp_api.robot index d2245c3f9a..9d6bbeaf2d 100644 --- a/resources/libraries/robot/overlay/lisp_api.robot +++ b/resources/libraries/robot/overlay/lisp_api.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Cisco and/or its affiliates. +# Copyright (c) 2021 Cisco 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: diff --git a/resources/libraries/robot/overlay/lispgpe.robot b/resources/libraries/robot/overlay/lispgpe.robot index 1fa84da721..53ca690621 100644 --- a/resources/libraries/robot/overlay/lispgpe.robot +++ b/resources/libraries/robot/overlay/lispgpe.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. +# Copyright (c) 2021 Cisco 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: diff --git a/resources/libraries/robot/overlay/srv6.robot b/resources/libraries/robot/overlay/srv6.robot index 92c8220cb7..83ec8949a4 100644 --- a/resources/libraries/robot/overlay/srv6.robot +++ b/resources/libraries/robot/overlay/srv6.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Cisco and/or its affiliates. +# Copyright (c) 2023 Cisco 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: @@ -263,7 +263,7 @@ | | ... | VPP Add IP Neighbor | | ... | ${dut1} | ${DUT1_${int}2}[0] | ${dut2_if1_ip6} | | ... | ${DUT2_${int}1_mac}[0] -| | Run Keyword Unless | ${dut2_status} +| | Run Keyword If | not ${dut2_status} | | ... | VPP Add IP Neighbor | | ... | ${dut1} | ${DUT1_${int}2}[0] | ${dut2_if1_ip6} | ${TG_pf2_mac}[0] | | Run Keyword If | ${dut2_status} @@ -367,16 +367,10 @@ | | Set up memif interfaces on DUT node | ${dut1} | ${sock1} | ${sock1} | | ... | ${1} | dut1-memif-1-if1 | dut1-memif-1-if2 | ${rxq_count_int} | | ... | ${rxq_count_int} -| | VPP Set interface MTU | ${dut1} | ${dut1-memif-1-if1} -| | VPP Set interface MTU | ${dut1} | ${dut1-memif-1-if2} | | Run Keyword If | ${dut2_status} | | ... | Set up memif interfaces on DUT node | ${dut2} | ${sock2} | ${sock2} | | ... | ${1} | dut2-memif-1-if1 | dut2-memif-1-if2 | ${rxq_count_int} | | ... | ${rxq_count_int} -| | Run Keyword If | ${dut2_status} -| | ... | VPP Set interface MTU | ${dut2} | ${dut2-memif-1-if1} -| | Run Keyword If | ${dut2_status} -| | ... | VPP Set interface MTU | ${dut2} | ${dut2-memif-1-if2} | | FOR | ${dut} | IN | @{duts} | | | Show Memif | ${nodes['${dut}']} | | END @@ -405,7 +399,7 @@ | | ... | VPP Add IP Neighbor | | ... | ${dut1} | ${DUT1_${int}2}[0] | ${dut2_if1_ip6} | | ... | ${DUT2_${int}1_mac}[0] -| | Run Keyword Unless | ${dut2_status} +| | Run Keyword If | not ${dut2_status} | | ... | VPP Add IP Neighbor | | ... | ${dut1} | ${DUT1_${int}2}[0] | ${dut2_if1_ip6} | ${TG_pf2_mac}[0] | | Run Keyword If | ${dut2_status} diff --git a/resources/libraries/robot/overlay/vxlan.robot b/resources/libraries/robot/overlay/vxlan.robot index f98514e2a2..92da03eaf1 100644 --- a/resources/libraries/robot/overlay/vxlan.robot +++ b/resources/libraries/robot/overlay/vxlan.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. +# Copyright (c) 2021 Cisco 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: |