aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/ip
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/robot/ip')
-rw-r--r--resources/libraries/robot/ip/ip4.robot171
-rw-r--r--resources/libraries/robot/ip/ip6.robot113
-rw-r--r--resources/libraries/robot/ip/nat.robot32
3 files changed, 181 insertions, 135 deletions
diff --git a/resources/libraries/robot/ip/ip4.robot b/resources/libraries/robot/ip/ip4.robot
index 961c0b3c43..192a136b79 100644
--- a/resources/libraries/robot/ip/ip4.robot
+++ b/resources/libraries/robot/ip/ip4.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2019 Cisco and/or its affiliates.
+# Copyright (c) 2020 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:
@@ -45,53 +45,55 @@
| |
| | Set interfaces in path up
| |
-| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 10.10.10.2 | ${tg_if1_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 10.10.10.2 | ${TG_pf1_mac}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | VPP Add IP Neighbor
-| | ... | ${dut1} | ${dut1_if2} | 1.1.1.2 | ${dut2_if1_mac}
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | 1.1.1.2 | ${DUT2_${int}1_mac}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | VPP Add IP Neighbor
-| | ... | ${dut2} | ${dut2_if1} | 1.1.1.1 | ${dut1_if2_mac}
+| | ... | ${dut2} | ${DUT2_${int}1_mac}[0] | 1.1.1.1 | ${DUT1_${int}2_mac}[0]
| | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Set Variable | ${dut2}
| | ... | ELSE | Set Variable | ${dut1}
| | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Set Variable | ${dut2_if2}
-| | ... | ELSE | Set Variable | ${dut1_if2}
-| | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 20.20.20.2 | ${tg_if2_mac}
+| | ... | Set Variable | ${DUT2_${int}2}[0]
+| | ... | ELSE | Set Variable | ${DUT1_${int}2}[0]
+| | VPP Add IP Neighbor
+| | ... | ${dut} | ${dut_if2} | 20.20.20.2 | ${TG_pf2_mac}[0]
| |
-| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1}
+| | VPP Interface Set IP Address | ${dut1} | ${DUT1_${int}1}[0]
| | ... | 10.10.10.1 | 24
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | VPP Interface Set IP Address | ${dut1} | ${dut1_if2}
+| | ... | VPP Interface Set IP Address | ${dut1} | ${DUT1_${int}2}[0]
| | ... | 1.1.1.1 | 30
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | VPP Interface Set IP Address | ${dut2} | ${dut2_if1}
+| | ... | VPP Interface Set IP Address | ${dut2} | ${DUT2_${int}1}[0]
| | ... | 1.1.1.2 | 30
| | VPP Interface Set IP Address | ${dut} | ${dut_if2}
| | ... | 20.20.20.1 | 24
| |
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Vpp Route Add | ${dut1} | 20.20.20.0 | 24 | gateway=1.1.1.2
-| | ... | interface=${dut1_if2}
+| | ... | interface=${DUT1_${int}2}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Vpp Route Add | ${dut2} | 10.10.10.0 | 24 | gateway=1.1.1.1
-| | ... | interface=${dut2_if1}
+| | ... | interface=${DUT2_${int}1}[0]
| |
| | Run Keyword Unless | '${remote_host1_ip}' == '${NONE}'
| | ... | Vpp Route Add | ${dut1} | ${remote_host1_ip} | 32
-| | ... | gateway=10.10.10.2 | interface=${dut1_if1}
+| | ... | gateway=10.10.10.2 | interface=${DUT1_${int}1}[0]
| | Run Keyword Unless | '${remote_host2_ip}' == '${NONE}'
| | ... | Vpp Route Add | ${dut} | ${remote_host2_ip} | 32
| | ... | gateway=20.20.20.2 | interface=${dut_if2}
| | Run Keyword Unless | '${remote_host1_ip}' == '${NONE}'
| | ... | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Vpp Route Add | ${dut1} | ${remote_host1_ip} | 32
-| | ... | gateway=1.1.1.2 | interface=${dut1_if2}
+| | ... | gateway=1.1.1.2 | interface=${DUT1_${int}2}[0]
| | Run Keyword Unless | '${remote_host2_ip}' == '${NONE}'
| | ... | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Vpp Route Add | ${dut2} | ${remote_host2_ip} | 32
-| | ... | gateway=1.1.1.1 | interface=${dut2_if1}
+| | ... | gateway=1.1.1.1 | interface=${DUT2_${int}1}[0]
| Initialize IPv4 forwarding with scaling in circular topology
| | [Documentation]
@@ -116,36 +118,39 @@
| |
| | Set interfaces in path up
| |
-| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg_if1_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 1.1.1.1 | ${TG_pf1_mac}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | VPP Add IP Neighbor
-| | ... | ${dut1} | ${dut1_if2} | 2.2.2.2 | ${dut2_if1_mac}
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | 2.2.2.2 | ${DUT2_${int}1}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | VPP Add IP Neighbor
-| | ... | ${dut2} | ${dut2_if1} | 2.2.2.1 | ${dut1_if2_mac}
+| | ... | ${dut2} | ${DUT2_${int}1}[0] | 2.2.2.1 | ${DUT1_${int}2_mac}[0]
| | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Set Variable | ${dut2}
| | ... | ELSE | Set Variable | ${dut1}
| | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Set Variable | ${dut2_if2}
-| | ... | ELSE | Set Variable | ${dut1_if2}
-| | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 3.3.3.1 | ${tg_if2_mac}
-| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 1.1.1.2 | 30
+| | ... | Set Variable | ${DUT2_${int}2}[0]
+| | ... | ELSE | Set Variable | ${DUT1_${int}2}[0]
+| | VPP Add IP Neighbor
+| | ... | ${dut} | ${dut_if2} | 3.3.3.1 | ${TG_pf2_mac}[0]
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 1.1.1.2 | 30
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} | 2.2.2.1
+| | ... | VPP Interface Set IP Address | ${dut1} | ${DUT1_${int}2}[0] | 2.2.2.1
| | ... | 30
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | VPP Interface Set IP Address | ${dut2} | ${dut2_if1} | 2.2.2.2
+| | ... | VPP Interface Set IP Address | ${dut2} | ${DUT2_${int}1}[0] | 2.2.2.2
| | ... | 30
| | VPP Interface Set IP Address | ${dut} | ${dut_if2} | 3.3.3.2 | 30
| | Vpp Route Add | ${dut1} | 10.0.0.0 | 32 | gateway=1.1.1.1
-| | ... | interface=${dut1_if1} | count=${count}
+| | ... | interface=${DUT1_${int}1}[0] | count=${count}
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Vpp Route Add | ${dut1} | 20.0.0.0 | 32 | gateway=2.2.2.2
-| | ... | interface=${dut1_if2} | count=${count}
+| | ... | interface=${DUT1_${int}2}[0] | count=${count}
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Vpp Route Add | ${dut2} | 10.0.0.0 | 32 | gateway=2.2.2.1
-| | ... | interface=${dut2_if1} | count=${count}
+| | ... | interface=${DUT2_${int}1}[0] | count=${count}
| | Vpp Route Add | ${dut} | 20.0.0.0 | 32 | gateway=3.3.3.1
| | ... | interface=${dut_if2} | count=${count}
@@ -206,21 +211,22 @@
| | ... | ${ip_base_if1}.${ip_base_if1}.${ip_base_if1}
| | Vpp Route Add | ${nodes['${dut}']} | ${tg_if1_net} | 24
| | ... | vrf=${fib_table_1} | gateway=${ip_net_if1}.1
-| | ... | interface=${${dut}_if1} | multipath=${TRUE}
-| | Assign Interface To Fib Table | ${nodes['${dut}']} | ${${dut}_if1}
+| | ... | interface=${${dut}_${int}1}[0] | multipath=${TRUE}
+| | Assign Interface To Fib Table | ${nodes['${dut}']} | ${${dut}_${int}1}[0]
| | ... | ${fib_table_1}
-| | VPP Interface Set IP Address | ${nodes['${dut}']} | ${${dut}_if1}
+| | VPP Interface Set IP Address | ${nodes['${dut}']} | ${${dut}_${int}1}[0]
| | ... | ${ip_net_if1}.2 | 30
| | ${prev_node}= | Run Keyword If | ${dut_index} == ${0}
| | ... | Set Variable | TG
| | ... | ELSE | Get From List | ${duts} | ${dut_index-${1}}
| | ${prev_if}= | Run Keyword If | ${dut_index} == ${0}
-| | ... | Set Variable | if1
-| | ... | ELSE | Set Variable | if2
+| | ... | Set Variable | pf1
+| | ... | ELSE | Set Variable | ${int}2
| | ${prev_if_mac}= | Get Interface MAC | ${nodes['${prev_node}']}
-| | ... | ${${prev_node}_${prev_if}}
+| | ... | ${${prev_node}_${prev_if}}[0]
| | VPP Add IP Neighbor
-| | ... | ${nodes['${dut}']} | ${${dut}_if1} | ${ip_net_if1}.1 | ${prev_if_mac}
+| | ... | ${nodes['${dut}']} | ${${dut}_${int}1}[0] | ${ip_net_if1}.1
+| | ... | ${prev_if_mac}
| |
| | ${fib_table_2}= | Evaluate | ${fib_table_1} + ${count}
| | Add Fib Table | ${nodes['${dut}']} | ${fib_table_2}
@@ -229,21 +235,22 @@
| | ... | ${ip_base_if2}.${ip_base_if2}.${ip_base_if2}
| | Vpp Route Add | ${nodes['${dut}']} | ${tg_if2_net} | 24
| | ... | vrf=${fib_table_2} | gateway=${ip_net_if2}.2
-| | ... | interface=${${dut}_if2} | multipath=${TRUE}
-| | Assign Interface To Fib Table | ${nodes['${dut}']} | ${${dut}_if2}
+| | ... | interface=${${dut}_${int}2}[0] | multipath=${TRUE}
+| | Assign Interface To Fib Table | ${nodes['${dut}']} | ${${dut}_${int}2}[0]
| | ... | ${fib_table_2}
-| | VPP Interface Set IP Address | ${nodes['${dut}']} | ${${dut}_if2}
+| | VPP Interface Set IP Address | ${nodes['${dut}']} | ${${dut}_${int}2}[0]
| | ... | ${ip_net_if2}.1 | 30
| | ${next_node}= | Run Keyword If | ${dut_index} == ${last_dut_index}
| | ... | Set Variable | TG
| | ... | ELSE | Get From List | ${duts} | ${dut_index+${1}}
| | ${next_if}= | Run Keyword If | ${dut_index} == ${last_dut_index}
-| | ... | Set Variable | if2
-| | ... | ELSE | Set Variable | if1
+| | ... | Set Variable | pf2
+| | ... | ELSE | Set Variable | ${int}1
| | ${next_if_mac}= | Get Interface MAC | ${nodes['${next_node}']}
-| | ... | ${${next_node}_${next_if}}
+| | ... | ${${next_node}_${next_if}}[0]
| | VPP Add IP Neighbor
-| | ... | ${nodes['${dut}']} | ${${dut}_if2} | ${ip_net_if2}.2 | ${next_if_mac}
+| | ... | ${nodes['${dut}']} | ${${dut}_${int}2}[0] | ${ip_net_if2}.2
+| | ... | ${next_if_mac}
| |
| | ${fib_table_1}= | Evaluate | ${fib_table_1} - ${1}
| | ${ip_base_start}= | Set Variable | ${31}
@@ -327,18 +334,22 @@
| | ${fib_table_2}= | Evaluate | ${fib_table_1}+${nf_nodes}
| | Add Fib Table | ${dut1} | ${fib_table_1}
| | Add Fib Table | ${dut1} | ${fib_table_2}
-| | Assign Interface To Fib Table | ${dut1} | ${dut1_if1} | ${fib_table_1}
-| | Assign Interface To Fib Table | ${dut1} | ${dut1_if2} | ${fib_table_2}
+| | Assign Interface To Fib Table
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | ${fib_table_1}
+| | Assign Interface To Fib Table
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | ${fib_table_2}
| | VPP Interface Set IP Address
-| | ... | ${dut1} | ${dut1_if1} | 100.0.0.1 | 30
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 100.0.0.1 | 30
| | VPP Interface Set IP Address
-| | ... | ${dut1} | ${dut1_if2} | 200.0.0.1 | 30
-| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 100.0.0.2 | ${tg_if1_mac}
-| | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 200.0.0.2 | ${tg_if2_mac}
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | 200.0.0.1 | 30
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 100.0.0.2 | ${TG_pf1_mac}[0]
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | 200.0.0.2 | ${TG_pf2_mac}[0]
| | Vpp Route Add | ${dut1} | 10.0.0.0 | 8 | gateway=100.0.0.2
-| | ... | interface=${dut1_if1} | vrf=${fib_table_1}
+| | ... | interface=${DUT1_${int}1}[0] | vrf=${fib_table_1}
| | Vpp Route Add | ${dut1} | 20.0.0.0 | 8 | gateway=200.0.0.2
-| | ... | interface=${dut1_if2} | vrf=${fib_table_2}
+| | ... | interface=${DUT1_${int}2}[0] | vrf=${fib_table_2}
| | FOR | ${number} | IN RANGE | 1 | ${nf_nodes}+1
| | | ${fib_table_1}= | Evaluate | ${100}+${number}
| | | ${fib_table_2}= | Evaluate | ${fib_table_1}+${1}
@@ -410,28 +421,34 @@
| | Add Fib Table | ${dut1} | ${fib_table_2}
| | Add Fib Table | ${dut2} | ${fib_table_1}
| | Add Fib Table | ${dut2} | ${fib_table_2}
-| | Assign Interface To Fib Table | ${dut1} | ${dut1_if1} | ${fib_table_1}
-| | Assign Interface To Fib Table | ${dut1} | ${dut1_if2} | ${fib_table_2}
-| | Assign Interface To Fib Table | ${dut2} | ${dut2_if1} | ${fib_table_1}
-| | Assign Interface To Fib Table | ${dut2} | ${dut2_if2} | ${fib_table_2}
+| | Assign Interface To Fib Table
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | ${fib_table_1}
+| | Assign Interface To Fib Table
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | ${fib_table_2}
+| | Assign Interface To Fib Table
+| | ... | ${dut2} | ${DUT2_${int}1}[0] | ${fib_table_1}
+| | Assign Interface To Fib Table
+| | ... | ${dut2} | ${DUT2_${int}2}[0] | ${fib_table_2}
| | VPP Interface Set IP Address
-| | ... | ${dut1} | ${dut1_if1} | 100.0.0.1 | 30
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 100.0.0.1 | 30
| | VPP Interface Set IP Address
-| | ... | ${dut1} | ${dut1_if2} | 150.0.0.1 | 30
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | 150.0.0.1 | 30
| | VPP Interface Set IP Address
-| | ... | ${dut2} | ${dut2_if1} | 150.0.0.2 | 30
+| | ... | ${dut2} | ${DUT2_${int}1}[0] | 150.0.0.2 | 30
| | VPP Interface Set IP Address
-| | ... | ${dut2} | ${dut2_if2} | 200.0.0.1 | 30
-| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 100.0.0.2 | ${tg_if1_mac}
-| | VPP Add IP Neighbor | ${dut2} | ${dut2_if2} | 200.0.0.2 | ${tg_if2_mac}
+| | ... | ${dut2} | ${DUT2_${int}2}[0] | 200.0.0.1 | 30
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 100.0.0.2 | ${TG_pf1_mac}[0]
+| | VPP Add IP Neighbor
+| | ... | ${dut2} | ${DUT2_${int}2}[0] | 200.0.0.2 | ${TG_pf2_mac}[0]
| | Vpp Route Add | ${dut1} | 10.0.0.0 | 8 | gateway=100.0.0.2
-| | ... | interface=${dut1_if1} | vrf=${fib_table_1}
+| | ... | interface=${DUT1_${int}1}[0] | vrf=${fib_table_1}
| | Vpp Route Add | ${dut1} | 20.0.0.0 | 8 | gateway=150.0.0.2
-| | ... | interface=${dut1_if2} | vrf=${fib_table_2}
+| | ... | interface=${DUT1_${int}2}[0] | vrf=${fib_table_2}
| | Vpp Route Add | ${dut2} | 10.0.0.0 | 8 | gateway=150.0.0.1
-| | ... | interface=${dut2_if1} | vrf=${fib_table_1}
+| | ... | interface=${DUT2_${int}1}[0] | vrf=${fib_table_1}
| | Vpp Route Add | ${dut2} | 20.0.0.0 | 8 | gateway=200.0.0.2
-| | ... | interface=${dut2_if2} | vrf=${fib_table_2}
+| | ... | interface=${DUT2_${int}2}[0] | vrf=${fib_table_2}
| | FOR | ${number} | IN RANGE | 1 | ${nf_nodes}+1
| | | ${fib_table_1}= | Evaluate | ${100}+${number}
| | | ${fib_table_2}= | Evaluate | ${fib_table_1}+${1}
@@ -543,39 +560,45 @@
| |
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Initialize VLAN dot1q sub-interfaces in circular topology
-| | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
+| | ... | ${dut1} | ${DUT1_${int}2}[0]
+| | ... | ${dut2} | ${DUT2_${int}1}[0] | SUB_ID=${subid}
| | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
-| | ... | ${dut1} | ${dut1_if2} | SUB_ID=${subid}
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | SUB_ID=${subid}
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Configure L2 tag rewrite method on interfaces | ${dut1}
-| | ... | ${subif_index_1} | ${dut2} | ${subif_index_2} | ${tag_rewrite}
+| | ... | Configure L2 tag rewrite method on interfaces
+| | ... | ${dut1} | ${subif_index_1}
+| | ... | ${dut2} | ${subif_index_2} | TAG_REWRITE_METHOD=${tag_rewrite}
| | ... | ELSE | Configure L2 tag rewrite method on interfaces
| | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
| |
-| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 1.1.1.1 | ${tg_if1_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 1.1.1.1 | ${TG_pf1_mac}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | VPP Add IP Neighbor
-| | ... | ${dut1} | ${subif_index_1} | 2.2.2.2 | ${dut2_if1_mac}
+| | ... | ${dut1} | ${subif_index_1} | 2.2.2.2 | ${DUT2_${int}1_mac}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | VPP Add IP Neighbor
-| | ... | ${dut2} | ${subif_index_2} | 2.2.2.1 | ${dut1_if2_mac}
+| | ... | ${dut2} | ${subif_index_2} | 2.2.2.1 | ${DUT1_${int}2_mac}[0]
| | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Set Variable | ${dut2}
| | ... | ELSE | Set Variable | ${dut1}
| | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Set Variable | ${dut2_if2}
| | ... | ELSE | Set Variable | ${subif_index_1}
-| | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 3.3.3.1 | ${tg_if2_mac}
-| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 1.1.1.2 | 30
+| | VPP Add IP Neighbor
+| | ... | ${dut} | ${dut_if2} | 3.3.3.1 | ${TG_pf2_mac}[0]
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 1.1.1.2 | 30
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | VPP Interface Set IP Address | ${dut1} | ${subif_index_1}
| | ... | 2.2.2.1 | 30
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | VPP Interface Set IP Address | ${dut2} | ${subif_index_2}
| | ... | 2.2.2.2 | 30
-| | VPP Interface Set IP Address | ${dut} | ${dut_if2} | 3.3.3.2 | 30
+| | VPP Interface Set IP Address
+| | ... | ${dut} | ${dut_if2} | 3.3.3.2 | 30
| | Vpp Route Add | ${dut1} | ${tg_if1_net} | 30 | gateway=1.1.1.1
-| | ... | interface=${dut1_if1}
+| | ... | interface=${DUT1_${int}1}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Vpp Route Add | ${dut1} | ${tg_if2_net} | 30 | gateway=2.2.2.2
| | ... | interface=${subif_index_1}
diff --git a/resources/libraries/robot/ip/ip6.robot b/resources/libraries/robot/ip/ip6.robot
index 715a5dd353..848e08d038 100644
--- a/resources/libraries/robot/ip/ip6.robot
+++ b/resources/libraries/robot/ip/ip6.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2019 Cisco and/or its affiliates.
+# Copyright (c) 2020 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:
@@ -47,51 +47,57 @@
| |
| | Set interfaces in path up
| |
-| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2001:1::2 | ${tg_if1_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 2001:1::2 | ${TG_pf1_mac}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | VPP Add IP Neighbor
-| | ... | ${dut1} | ${dut1_if2} | 2001:3::1 | ${dut2_if1_mac}
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | 2001:3::1 | ${DUT2_${int}1_mac}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | VPP Add IP Neighbor
-| | ... | ${dut2} | ${dut2_if1} | 2001:3::2 | ${dut1_if2_mac}
+| | ... | ${dut2} | ${DUT2_${int}1}[0] | 2001:3::2 | ${DUT1_${int}2_mac}[0]
| | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Set Variable | ${dut2}
| | ... | ELSE | Set Variable | ${dut1}
| | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Set Variable | ${dut2_if2}
-| | ... | ELSE | Set Variable | ${dut1_if2}
-| | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 2001:2::2 | ${tg_if2_mac}
+| | ... | Set Variable | ${DUT2_${int}2}[0]
+| | ... | ELSE | Set Variable | ${DUT1_${int}2}[0]
+| | VPP Add IP Neighbor
+| | ... | ${dut} | ${dut_if2} | 2001:2::2 | ${TG_pf2_mac}[0]
| |
-| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 2001:1::1 | 64
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 2001:1::1 | 64
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} | 2001:3::1 | 64
+| | ... | VPP Interface Set IP Address
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | 2001:3::1 | 64
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | VPP Interface Set IP Address | ${dut2} | ${dut2_if1} | 2001:3::2 | 64
-| | VPP Interface Set IP Address | ${dut} | ${dut_if2} | 2001:2::1 | 64
+| | ... | VPP Interface Set IP Address
+| | ... | ${dut2} | ${DUT2_${int}1}[0] | 2001:3::2 | 64
+| | VPP Interface Set IP Address
+| | ... | ${dut} | ${dut_if2} | 2001:2::1 | 64
| |
| | Vpp All Ra Suppress Link Layer | ${nodes}
| |
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Vpp Route Add | ${dut1} | 2001:2::0 | 64 | gateway=2001:3::2
-| | ... | interface=${dut1_if2}
+| | ... | interface=${DUT1_${int}2}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Vpp Route Add | ${dut2} | 2001:1::0 | 64 | gateway=2001:3::1
-| | ... | interface=${dut2_if1}
+| | ... | interface=${DUT2_${int}1}[0]
| |
| | Run Keyword Unless | '${remote_host1_ip}' == '${NONE}'
| | ... | Vpp Route Add | ${dut1} | ${remote_host1_ip} | 128
-| | ... | gateway=2001:1::2 | interface=${dut1_if1}
+| | ... | gateway=2001:1::2 | interface=${DUT1_${int}1}[0]
| | Run Keyword Unless | '${remote_host2_ip}' == '${NONE}'
| | ... | Vpp Route Add | ${dut} | ${remote_host2_ip} | 128
| | ... | gateway=2001:2::2 | interface=${dut_if2}
| | Run Keyword Unless | '${remote_host1_ip}' == '${NONE}'
| | ... | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Vpp Route Add | ${dut1} | ${remote_host1_ip} | 128
-| | ... | gateway=2001:3::2 | interface=${dut1_if2}
+| | ... | gateway=2001:3::2 | interface=${DUT1_${int}2}[0]
| | Run Keyword Unless | '${remote_host2_ip}' == '${NONE}'
| | ... | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Vpp Route Add | ${dut2} | ${remote_host2_ip} | 128
-| | ... | gateway=2001:3::1 | interface=${dut2_if1}
+| | ... | gateway=2001:3::1 | interface=${DUT2_${int}1}[0]
| Initialize IPv6 forwarding with scaling in circular topology
| | [Documentation]
@@ -118,37 +124,41 @@
| |
| | ${prefix}= | Set Variable | 64
| | ${host_prefix}= | Set Variable | 128
-| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 2001:3::1 | ${prefix}
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 2001:3::1 | ${prefix}
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | VPP Interface Set IP Address
-| | ... | ${dut1} | ${dut1_if2} | 2001:4::1 | ${prefix}
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | 2001:4::1 | ${prefix}
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | VPP Interface Set IP Address
-| | ... | ${dut2} | ${dut2_if1} | 2001:4::2 | ${prefix}
+| | ... | ${dut2} | ${DUT2_${int}1}[0] | 2001:4::2 | ${prefix}
| | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Set Variable | ${dut2}
| | ... | ELSE | Set Variable | ${dut1}
| | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Set Variable | ${dut2_if2}
-| | ... | ELSE | Set Variable | ${dut1_if2}
-| | VPP Interface Set IP Address | ${dut} | ${dut_if2} | 2001:5::1 | ${prefix}
+| | ... | Set Variable | ${DUT2_${int}2}[0]
+| | ... | ELSE | Set Variable | ${DUT1_${int}2}[0]
+| | VPP Interface Set IP Address
+| | ... | ${dut} | ${dut_if2} | 2001:5::1 | ${prefix}
| | Vpp All Ra Suppress Link Layer | ${nodes}
-| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2001:3::2 | ${tg_if1_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 2001:3::2 | ${TG_pf1_mac}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | VPP Add Ip Neighbor
-| | ... | ${dut1} | ${dut1_if2} | 2001:4::2 | ${dut2_if1_mac}
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | 2001:4::2 | ${DUT2_${int}1_mac}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | VPP Add Ip Neighbor
-| | ... | ${dut2} | ${dut2_if1} | 2001:4::1 | ${dut1_if2_mac}
-| | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 2001:5::2 | ${tg_if2_mac}
+| | ... | ${dut2} | ${DUT2_${int}1}[0] | 2001:4::1 | ${DUT1_${int}2_mac}[0]
+| | VPP Add IP Neighbor
+| | ... | ${dut} | ${dut_if2} | 2001:5::2 | ${TG_pf2_mac}[0]
| | Vpp Route Add | ${dut1} | 2001:1::0 | ${host_prefix} | gateway=2001:3::2
-| | ... | interface=${dut1_if1} | count=${count}
+| | ... | interface=${DUT1_${int}1}[0] | count=${count}
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Vpp Route Add | ${dut1} | 2001:2::0 | ${host_prefix}
-| | ... | gateway=2001:4::2 | interface=${dut1_if2} | count=${count}
+| | ... | gateway=2001:4::2 | interface=${DUT1_${int}2}[0] | count=${count}
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Vpp Route Add | ${dut2} | 2001:1::0 | ${host_prefix}
-| | ... | gateway=2001:4::1 | interface=${dut2_if1} | count=${count}
+| | ... | gateway=2001:4::1 | interface=${DUT2_${int}1}[0] | count=${count}
| | Vpp Route Add | ${dut} | 2001:2::0 | ${host_prefix} | gateway=2001:5::2
| | ... | interface=${dut_if2} | count=${count}
@@ -185,16 +195,22 @@
| | ${fib_table_2}= | Evaluate | ${fib_table_1}+${nf_nodes}
| | Add Fib Table | ${dut1} | ${fib_table_1} | ipv6=${True}
| | Add Fib Table | ${dut1} | ${fib_table_2} | ipv6=${True}
-| | Assign Interface To Fib Table | ${dut1} | ${dut1_if1} | ${fib_table_1}
+| | Assign Interface To Fib Table
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | ${fib_table_1}
| | ... | ipv6=${True}
-| | Assign Interface To Fib Table | ${dut1} | ${dut1_if2} | ${fib_table_2}
+| | Assign Interface To Fib Table
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | ${fib_table_2}
| | ... | ipv6=${True}
-| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 2001:100::1
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 2001:100::1
| | ... | ${prefix}
-| | VPP Interface Set IP Address | ${dut1} | ${dut1_if2} | 2001:200::1
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | 2001:200::1
| | ... | ${prefix}
-| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2001:100::2 | ${tg_if1_mac}
-| | VPP Add IP Neighbor | ${dut1} | ${dut1_if2} | 2001:200::2 | ${tg_if2_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 2001:100::2 | ${TG_pf1_mac}[0]
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | 2001:200::2 | ${TG_pf2_mac}[0]
| | Vpp Route Add | ${dut1} | 2001:1::0 | 64 | gateway=2001:100::2
| | ... | interface=${dut1_if1} | vrf=${fib_table_1}
| | Vpp Route Add | ${dut1} | 2001:2::0 | 64 | gateway=2001:200::2
@@ -263,32 +279,37 @@
| |
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Initialize VLAN dot1q sub-interfaces in circular topology
-| | ... | ${dut1} | ${dut1_if2} | ${dut2} | ${dut2_if1} | ${subid}
+| | ... | ${dut1} | ${DUT1_${int}2}[0]
+| | ... | ${dut2} | ${DUT2_${int}1}[0] | SUB_ID=${subid}
| | ... | ELSE | Initialize VLAN dot1q sub-interfaces in circular topology
-| | ... | ${dut1} | ${dut1_if2} | SUB_ID=${subid}
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | SUB_ID=${subid}
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Configure L2 tag rewrite method on interfaces | ${dut1}
-| | ... | ${subif_index_1} | ${dut2} | ${subif_index_2} | ${tag_rewrite}
+| | ... | Configure L2 tag rewrite method on interfaces
+| | ... | ${dut1} | ${subif_index_1}
+| | ... | ${dut2} | ${subif_index_2} | TAG_REWRITE_METHOD=${tag_rewrite}
| | ... | ELSE | Configure L2 tag rewrite method on interfaces
| | ... | ${dut1} | ${subif_index_1} | TAG_REWRITE_METHOD=${tag_rewrite}
| |
| | ${prefix}= | Set Variable | 64
| | ${host_prefix}= | Set Variable | 64
-| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 2002:1::1 | ${tg_if1_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 2002:1::1 | ${TG_pf1_mac}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | VPP Add Ip Neighbor
-| | ... | ${dut1} | ${subif_index_1} | 2002:2::2 | ${dut2_if1_mac}
+| | ... | ${dut1} | ${subif_index_1} | 2002:2::2 | ${DUT2_${int}1_mac}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | VPP Add Ip Neighbor
-| | ... | ${dut2} | ${subif_index_2} | 2002:2::1 | ${dut1_if2_mac}
+| | ... | ${dut2} | ${subif_index_2} | 2002:2::1 | ${DUT1_${int}2_mac}[0]
| | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Set Variable | ${dut2}
| | ... | ELSE | Set Variable | ${dut1}
| | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Set Variable | ${dut2_if2}
+| | ... | Set Variable | ${DUT2_${int}2}[0]
| | ... | ELSE | Set Variable | ${subif_index_1}
-| | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 2002:3::1 | ${tg_if2_mac}
-| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 2002:1::2 | ${prefix}
+| | VPP Add IP Neighbor
+| | ... | ${dut} | ${dut_if2} | 2002:3::1 | ${TG_pf2_mac}[0]
+| | VPP Interface Set IP Address
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | 2002:1::2 | ${prefix}
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | VPP Interface Set IP Address | ${dut1} | ${subif_index_1} | 2002:2::1
| | ... | ${prefix}
@@ -298,7 +319,7 @@
| | VPP Interface Set IP Address | ${dut} | ${dut_if2} | 2002:3::2 | ${prefix}
| | Vpp All Ra Suppress Link Layer | ${nodes}
| | Vpp Route Add | ${dut1} | ${tg_if1_net} | ${host_prefix}
-| | ... | gateway=2002:1::1 | interface=${dut1_if1}
+| | ... | gateway=2002:1::1 | interface=${DUT1_${int}1}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Vpp Route Add | ${dut1} | ${tg_if2_net} | ${host_prefix}
| | ... | gateway=2002:2::2 | interface=${subif_index_1}
diff --git a/resources/libraries/robot/ip/nat.robot b/resources/libraries/robot/ip/nat.robot
index bb44fa1a18..076a0a20b8 100644
--- a/resources/libraries/robot/ip/nat.robot
+++ b/resources/libraries/robot/ip/nat.robot
@@ -1,4 +1,4 @@
-# Copyright (c) 2019 Cisco and/or its affiliates.
+# Copyright (c) 2020 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:
@@ -85,43 +85,45 @@
| |
| | Set interfaces in path up
| |
-| | VPP Interface Set IP Address | ${dut1} | ${dut1_if1} | 10.0.0.1 | 20
+| | VPP Interface Set IP Address | ${dut1} | ${DUT1_${int}1}[0] | 10.0.0.1 | 20
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | VPP Interface Set IP Address | ${dut1} | ${dut1_if2}
+| | ... | VPP Interface Set IP Address | ${dut1} | ${DUT1_${int}2}[0]
| | ... | 11.0.0.1 | 20
| | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | VPP Interface Set IP Address | ${dut2} | ${dut2_if1}
+| | ... | VPP Interface Set IP Address | ${dut2} | ${DUT2_${int}1}[0]
| | ... | 11.0.0.2 | 20
| | ${dut}= | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Set Variable | ${dut2}
| | ... | ELSE | Set Variable | ${dut1}
| | ${dut_if2}= | Run Keyword If | '${dut2_status}' == 'PASS'
-| | ... | Set Variable | ${dut2_if2}
-| | ... | ELSE | Set Variable | ${dut1_if2}
+| | ... | Set Variable | ${DUT2_${int}1}[0]
+| | ... | ELSE | Set Variable | ${DUT1_${int}2}[0]
| | VPP Interface Set IP Address | ${dut} | ${dut_if2} | 12.0.0.1 | 20
| |
-| | VPP Add IP Neighbor | ${dut1} | ${dut1_if1} | 10.0.0.2 | ${tg_if1_mac}
+| | VPP Add IP Neighbor
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | 10.0.0.2 | ${TG_pf1_mac}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | VPP Add IP Neighbor
-| | ... | ${dut1} | ${dut1_if2} | 11.0.0.2 | ${dut2_if1_mac}
+| | ... | ${dut1} | ${DUT1_${int}2}[0] | 11.0.0.2 | ${DUT2_${int}1_mac}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | VPP Add IP Neighbor
-| | ... | ${dut2} | ${dut2_if1} | 11.0.0.1 | ${dut1_if2_mac}
-| | VPP Add IP Neighbor | ${dut} | ${dut_if2} | 12.0.0.2 | ${tg_if2_mac}
+| | ... | ${dut2} | ${DUT2_${int}1}[0] | 11.0.0.1 | ${DUT1_${int}2_mac}[0]
+| | VPP Add IP Neighbor
+| | ... | ${dut} | ${dut_if2} | 12.0.0.2 | ${TG_pf2_mac}[0]
| |
| | Vpp Route Add | ${dut1} | 20.0.0.0 | 18 | gateway=10.0.0.2
-| | ... | interface=${dut1_if1}
+| | ... | interface=${DUT1_${int}1}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Vpp Route Add | ${dut1} | 12.0.0.2 | 32 | gateway=11.0.0.2
-| | ... | interface=${dut1_if2}
+| | ... | interface=${DUT1_${int}2}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Vpp Route Add | ${dut2} | 12.0.0.0 | 24 | gateway=12.0.0.2
-| | ... | interface=${dut2_if2}
+| | ... | interface=${DUT2_${int}2}[0]
| | Run Keyword If | '${dut2_status}' == 'PASS'
| | ... | Vpp Route Add | ${dut2} | 200.0.0.0 | 30 | gateway=11.0.0.1
-| | ... | interface=${dut2_if1}
+| | ... | interface=${DUT2_${int}1}[0]
| |
| | Configure inside and outside interfaces
-| | ... | ${dut1} | ${dut1_if1} | ${dut1_if2}
+| | ... | ${dut1} | ${DUT1_${int}1}[0] | ${DUT1_${int}2}[0]
| | Configure deterministic mode for NAT44
| | ... | ${dut1} | 20.0.0.0 | 18 | 200.0.0.0 | 30