aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/robot')
-rw-r--r--resources/libraries/robot/interfaces.robot15
-rw-r--r--resources/libraries/robot/ipv4.robot14
-rw-r--r--resources/libraries/robot/ipv6.robot26
3 files changed, 36 insertions, 19 deletions
diff --git a/resources/libraries/robot/interfaces.robot b/resources/libraries/robot/interfaces.robot
index 18c9c0cc81..649ee63253 100644
--- a/resources/libraries/robot/interfaces.robot
+++ b/resources/libraries/robot/interfaces.robot
@@ -11,6 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
*** Settings ***
+| Library | resources.libraries.python.InterfaceUtil
+| Library | resources.libraries.python.NodePath
| Resource | resources/libraries/robot/vat/interfaces.robot
*** Keywords ***
@@ -18,3 +20,16 @@
| | VPP reports interfaces through VAT on | ${node}
#| | VPP reports interfaces through ODL on | ${node}
#| | VPP reports interfaces through DEBUGCLI on | ${node}
+
+| Setup MTU on TG based on MTU on DUT
+| | [Documentation] | Type of the tg_node must be TG and dut_node must be DUT
+| | [Arguments] | ${tg_node} | ${dut_node}
+| | Append Nodes | ${tg_node} | ${dut_node}
+| | Compute Path
+| | ${tg_port} | ${tg_node}= | First Interface
+| | ${dut_port} | ${dut_node}= | Last Interface
+| | # get physical layer MTU (max. size of Ethernet frame)
+| | ${mtu}= | Get Interface MTU | ${dut_node} | ${dut_port}
+| | # Ethernet MTU is physical layer MTU minus size of Ethernet header and FCS
+| | ${eth_mtu}= | Evaluate | ${mtu} - 14 - 4
+| | Set Interface Ethernet MTU | ${tg_node} | ${tg_port} | ${eth_mtu}
diff --git a/resources/libraries/robot/ipv4.robot b/resources/libraries/robot/ipv4.robot
index 4c76644c54..63a1188332 100644
--- a/resources/libraries/robot/ipv4.robot
+++ b/resources/libraries/robot/ipv4.robot
@@ -75,18 +75,20 @@
| Ipv4 icmp echo sweep
| | [Documentation] | Type of the src_node must be TG and dst_node must be DUT
-| | [Arguments] | ${src_node} | ${dst_node} | ${src_port} | ${dst_port}
+| | [Arguments] | ${src_node} | ${dst_node} | ${start_size} | ${end_size} | ${step}
+| | Append Nodes | ${src_node} | ${dst_node}
+| | Compute Path
+| | ${src_port} | ${src_node}= | First Interface
+| | ${dst_port} | ${dst_node}= | Last Interface
| | ${src_ip}= | Get IPv4 address of node "${src_node}" interface "${src_port}" from "${nodes_ipv4_addr}"
| | ${dst_ip}= | Get IPv4 address of node "${dst_node}" interface "${dst_port}" from "${nodes_ipv4_addr}"
| | ${src_mac}= | Get Interface Mac | ${src_node} | ${src_port}
| | ${dst_mac}= | Get Interface Mac | ${dst_node} | ${dst_port}
| | ${args}= | Traffic Script Gen Arg | ${src_port} | ${src_port} | ${src_mac}
| | | ... | ${dst_mac} | ${src_ip} | ${dst_ip}
-| # TODO: end_size is currently minimum MTU size for Ethernet minus IPv4 and
-| # ICMP echo header size (1500 - 20 - 8),
-| # MTU info is not in VAT sw_interface_dump output
-| | ${args}= | Set Variable | ${args} --start_size 1 --end_size 1472 --step 1
-| | Run Traffic Script On Node | ipv4_sweep_ping.py | ${src_node} | ${args}
+| | ${args}= | Set Variable
+| | ... | ${args} --start_size ${start_size} --end_size ${end_size} --step ${step}
+| | Run Traffic Script On Node | ipv4_sweep_ping.py | ${src_node} | ${args} | ${20}
| Send ARP request and validate response
| | [Arguments] | ${tg_node} | ${vpp_node}
diff --git a/resources/libraries/robot/ipv6.robot b/resources/libraries/robot/ipv6.robot
index 78a8eda45a..17ab14274f 100644
--- a/resources/libraries/robot/ipv6.robot
+++ b/resources/libraries/robot/ipv6.robot
@@ -14,12 +14,12 @@
"""IPv6 keywords"""
*** Settings ***
-| Library | resources/libraries/python/IPv6Util.py
-| Library | resources/libraries/python/IPv6Setup.py
-| Library | resources/libraries/python/TrafficScriptExecutor.py
-| Library | resources/libraries/python/NodePath.py
-| Library | resources/libraries/python/Routing.py
-| Library | resources/libraries/python/InterfaceUtil.py
+| Library | resources.libraries.python.IPv6Util
+| Library | resources.libraries.python.IPv6Setup
+| Library | resources.libraries.python.TrafficScriptExecutor
+| Library | resources.libraries.python.NodePath
+| Library | resources.libraries.python.Routing
+| Library | resources.libraries.python.InterfaceUtil
| Library | resources.libraries.python.topology.Topology
| Resource | resources/libraries/robot/default.robot
| Resource | resources/libraries/robot/counters.robot
@@ -42,12 +42,13 @@
| | Run Traffic Script On Node | icmpv6_echo.py | ${tg_node} | ${args}
| | Vpp dump stats | ${dst_node}
| | ${ipv6_counter}= | Vpp get interface ipv6 counter | ${dst_node} | ${dst_port}
-| | Should Be Equal | ${ipv6_counter} | ${2} | #ICMPv6 neighbor advertisment + ICMPv6 echo request
+| | Should Be Equal | ${ipv6_counter} | ${2} | #ICMPv6 neighbor advertisement + ICMPv6 echo request
| Ipv6 icmp echo sweep
| | [Documentation] | Type of the src_node must be TG and dst_node must be DUT
-| | [Arguments] | ${tg_node} | ${dut_node} | ${nodes_addr}
-| | Append Nodes | ${tg_node} | ${dut_node}
+| | [Arguments] | ${src_node} | ${dst_node} | ${start_size} | ${end_size}
+| | ... | ${step} | ${nodes_addr}
+| | Append Nodes | ${src_node} | ${dst_node}
| | Compute Path
| | ${src_port} | ${src_node}= | First Interface
| | ${dst_port} | ${dst_node}= | Last Interface
@@ -57,10 +58,9 @@
| | ${dst_mac}= | Get Interface Mac | ${dst_node} | ${dst_port}
| | ${args}= | Traffic Script Gen Arg | ${src_port} | ${src_port} | ${src_mac}
| | | ... | ${dst_mac} | ${src_ip} | ${dst_ip}
-| # TODO: end_size is currently minimum MTU size for IPv6 minus IPv6 and ICMPv6
-| # echo header size, MTU info is not in VAT sw_interface_dump output
-| | ${args}= | Set Variable | ${args} --start_size 0 --end_size 1232 --step 1
-| | Run Traffic Script On Node | ipv6_sweep_ping.py | ${tg_node} | ${args} | ${20}
+| | ${args}= | Set Variable
+| | ... | ${args} --start_size ${start_size} --end_size ${end_size} --step ${step}
+| | Run Traffic Script On Node | ipv6_sweep_ping.py | ${src_node} | ${args} | ${20}
| Ipv6 tg to dut1 egress
| | [Documentation] | Send traffic from TG to first DUT egress interface