diff options
Diffstat (limited to 'resources/libraries/robot')
4 files changed, 179 insertions, 19 deletions
diff --git a/resources/libraries/robot/overlay/srv6.robot b/resources/libraries/robot/overlay/srv6.robot index 9be3f974e3..b253311d0e 100644 --- a/resources/libraries/robot/overlay/srv6.robot +++ b/resources/libraries/robot/overlay/srv6.robot @@ -82,18 +82,19 @@ | | ... | *Arguments:* | | ... | - dut_node - DUT node where to create SRv6 policy on. Type: dictionary | | ... | - bsid - BindingSID - local SID IPv6 address. Type: string -| | ... | - mode - Encapsulation / insertion mode (Optional, default value: -| | ... | encap). Type: string +| | ... | - mode - Encapsulation / insertion mode. Type: string | | ... | - sid_list - SID list. Type: list | | ... | | ... | *Example:* | | ... -| | ... | \| Configure SR Policy on DUT \| ${nodes['DUT2']} \| D:: \ -| | ... | \| mode=insert \| E::\| F:: \| +| | ... | \| Configure SR Policy on DUT \| ${nodes['DUT2']} \| A:: \| encap \ +| | ... | \| B::\| C:: \| +| | ... | \| Configure SR Policy on DUT \| ${nodes['DUT2']} \| D:: \| insert \ +| | ... | \| E::\| F:: \| | | ... -| | [Arguments] | ${dut_node} | ${bsid} | ${mode}=encap | @{sid_list} +| | [Arguments] | ${dut_node} | ${bsid} | ${mode} | @{sid_list} | | ... -| | Configure SR Policy | ${dut_node} | ${bsid} | @{sid_list} | mode=${mode} +| | Configure SR Policy | ${dut_node} | ${bsid} | ${sid_list} | mode=${mode} | Delete SR Policy on DUT | | [Documentation] | Delete SRv6 policy on the given DUT node. @@ -211,3 +212,51 @@ | | [Arguments] | ${dut_node} | ${ip6_addr} | | ... | | Set SR Encaps Source Address | ${dut_node} | ip6_addr=${ip6_addr} + +| Show SR Policies on all DUTs +| | [Documentation] | Show SRv6 policies on all DUT nodes in topology. +| | ... +| | ... | *Arguments:* +| | ... | - nodes - Topology. Type: dictionary +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Show SR Policies on all DUTs \| ${nodes} \| +| | ... +| | [Arguments] | ${nodes} +| | ... +| | ${duts}= | Get Matches | ${nodes} | DUT* +| | :FOR | ${dut} | IN | @{duts} +| | | Show SR Policies | ${nodes['${dut}']} + +| Show SR Steering Policies on all DUTs +| | [Documentation] | Show SRv6 steering policies on all DUT nodes in topology. +| | ... +| | ... | *Arguments:* +| | ... | - nodes - Topology. Type: dictionary +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Show SR Steering Policies on all DUTs \| ${nodes} \| +| | ... +| | [Arguments] | ${nodes} +| | ... +| | ${duts}= | Get Matches | ${nodes} | DUT* +| | :FOR | ${dut} | IN | @{duts} +| | | Show SR Steering Policies | ${nodes['${dut}']} + +| Show SR LocalSIDs on all DUTs +| | [Documentation] | Show SRv6 LocalSIDs on all DUT nodes in topology. +| | ... +| | ... | *Arguments:* +| | ... | - nodes - Topology. Type: dictionary +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Show SR LocalSIDs on all DUTs \| ${nodes} \| +| | ... +| | [Arguments] | ${nodes} +| | ... +| | ${duts}= | Get Matches | ${nodes} | DUT* +| | :FOR | ${dut} | IN | @{duts} +| | | Show SR LocalSIDs | ${nodes['${dut}']} diff --git a/resources/libraries/robot/performance/performance_configuration.robot b/resources/libraries/robot/performance/performance_configuration.robot index f6b1230e7b..52be3a26a8 100644 --- a/resources/libraries/robot/performance/performance_configuration.robot +++ b/resources/libraries/robot/performance/performance_configuration.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. +# Copyright (c) 2018 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: @@ -33,6 +33,7 @@ | Resource | resources/libraries/robot/ip/ip6.robot | Resource | resources/libraries/robot/vm/qemu.robot | Resource | resources/libraries/robot/l2/tagging.robot +| Resource | resources/libraries/robot/overlay/srv6.robot | Documentation | Performance suite keywords - configuration. *** Keywords *** @@ -598,6 +599,82 @@ | | And Vpp Enable Input Acl Interface | | ... | ${dut2} | ${dut2_if2} | ip6 | ${table_idx} +| Initialize IPv6 forwarding over SRv6 with encapsulation with '${n}' x SID '${prepos}' decapsulation in 3-node circular topology +| | [Documentation] +| | ... | Set UP state on VPP interfaces in path on nodes in 3-node circular +| | ... | topology. Get the interface MAC addresses and setup neighbours on all +| | ... | VPP interfaces. Setup IPv6 addresses on all interfaces. Set segment +| | ... | routing for IPv6 for required number of SIDs and configure IPv6 routes +| | ... | on both DUT nodes. +| | ... +| | ${tg1_if1_mac}= | Get Interface MAC | ${tg} | ${tg_if1} +| | ${tg1_if2_mac}= | Get Interface MAC | ${tg} | ${tg_if2} +| | ${dut1_if2_mac}= | Get Interface MAC | ${dut1} | ${dut1_if2} +| | ${dut2_if1_mac}= | Get Interface MAC | ${dut2} | ${dut2_if1} +| | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if1} | ${dut1_if1_ip6} | ${prefix} +| | VPP Set If IPv6 Addr | ${dut1} | ${dut1_if2} | ${dut1_if2_ip6} | ${prefix} +| | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if1} | ${dut2_if1_ip6} | ${prefix} +| | VPP Set If IPv6 Addr | ${dut2} | ${dut2_if2} | ${dut2_if2_ip6} | ${prefix} +| | Suppress ICMPv6 router advertisement message | ${nodes} +| | :FOR | ${number} | IN RANGE | 2 | ${dst_addr_nr}+2 +| | | ${hexa_nr}= | Convert To Hex | ${number} +| | | Add Ip Neighbor | ${dut1} | ${dut1_if1} | ${tg_if1_ip6_subnet}${hexa_nr} +| | | ... | ${tg1_if1_mac} +| | | Add Ip Neighbor | ${dut2} | ${dut2_if2} | ${tg_if2_ip6_subnet}${hexa_nr} +| | | ... | ${tg1_if2_mac} +| | Add Ip Neighbor | ${dut1} | ${dut1_if2} | ${dut2_if1_ip6} | ${dut2_if1_mac} +| | Add Ip Neighbor | ${dut2} | ${dut2_if1} | ${dut1_if2_ip6} | ${dut1_if2_mac} +| | ${sid1}= | Set Variable If +| | ... | "${n}" == "1" | ${dut2_sid1} +| | ... | "${n}" == "2" | ${dut2_sid1_1} +| | ${sid2}= | Set Variable If +| | ... | "${n}" == "1" | ${dut1_sid2} +| | ... | "${n}" == "2" | ${dut1_sid2_1} +| | Vpp Route Add | ${dut1} | ${sid1} | ${sid_prefix} | ${dut2_if1_ip6} +| | ... | ${dut1_if2} +| | Vpp Route Add | ${dut2} | ${sid2} | ${sid_prefix} | ${dut1_if2_ip6} +| | ... | ${dut2_if1} +| | Set SR Encaps Source Address on DUT | ${dut1} | ${dut1_sid1} +| | @{sid_list_dir0}= | Run Keyword If | "${n}" == "1" +| | ... | Create List | ${dut2_sid1} +| | ... | ELSE IF | "${n}" == "2" +| | ... | Create List | ${dut2_sid1_1} | ${dut2_sid1_2} +| | Configure SR Policy on DUT | ${dut1} | ${dut1_bsid} | encap +| | ... | @{sid_list_dir0} +| | Configure SR Steer on DUT | ${dut1} | L3 | ${dut1_bsid} +| | ... | ip_addr=${tg_if2_ip6_subnet} | prefix=${sid_prefix} +| | Run Keyword If | "${n}" == "1" +| | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1} | end.dx6 +| | ... | interface=${dut2_if2} | next_hop=${tg_if2_ip6_subnet}2 +| | Run Keyword If | "${n}" == "2" +| | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1_1} | end +| | Run Keyword If | "${n}" == "2" and "${prepos}" != "without" +| | ... | Configure SR LocalSID on DUT | ${dut2} | ${dut2_sid1_2} | end.dx6 +| | ... | interface=${dut2_if2} | next_hop=${tg_if2_ip6_subnet}2 +| | Run Keyword If | "${n}" == "2" and "${prepos}" == "without" +| | ... | Vpp Route Add | ${dut2} | ${dut2_sid1_2} | ${sid_prefix} +| | ... | ${tg_if2_ip6_subnet}2 | ${dut2_if2} +| | Set SR Encaps Source Address on DUT | ${dut2} | ${dut2_sid2} +| | @{sid_list_dir1}= | Run Keyword If | "${n}" == "1" +| | ... | Create List | ${dut1_sid2} +| | ... | ELSE IF | "${n}" == "2" +| | ... | Create List | ${dut1_sid2_1} | ${dut1_sid2_2} +| | Configure SR Policy on DUT | ${dut2} | ${dut2_bsid} | encap +| | ... | @{sid_list_dir1} +| | Configure SR Steer on DUT | ${dut2} | L3 | ${dut2_bsid} +| | ... | ip_addr=${tg_if1_ip6_subnet} | prefix=${sid_prefix} +| | Run Keyword If | "${n}" == "1" +| | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2} | end.dx6 +| | ... | interface=${dut1_if1} | next_hop=${tg_if1_ip6_subnet}2 +| | Run Keyword If | "${n}" == "2" +| | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2_1} | end +| | Run Keyword If | "${n}" == "2" and "${prepos}" != "without" +| | ... | Configure SR LocalSID on DUT | ${dut1} | ${dut1_sid2_2} | end.dx6 +| | ... | interface=${dut1_if1} | next_hop=${tg_if1_ip6_subnet}2 +| | Run Keyword If | "${n}" == "2" and "${prepos}" == "without" +| | ... | Vpp Route Add | ${dut1} | ${dut1_sid2_2} | ${sid_prefix} +| | ... | ${tg_if1_ip6_subnet}2 | ${dut1_if1} + | Initialize L2 xconnect in 3-node circular topology | | [Documentation] | | ... | Setup L2 xconnect topology by cross connecting two interfaces on diff --git a/resources/libraries/robot/performance/performance_setup.robot b/resources/libraries/robot/performance/performance_setup.robot index f1ad973bb8..a3d6eea4c7 100644 --- a/resources/libraries/robot/performance/performance_setup.robot +++ b/resources/libraries/robot/performance/performance_setup.robot @@ -510,6 +510,8 @@ | | Show VAT History On All DUTs | ${nodes} | | Show statistics on all DUTs | ${nodes} | | Run Keyword If Test Failed +| | ... | Set Test Variable | ${pkt_trace} | ${True} +| | Run Keyword If Test Failed | | ... | Traffic should pass with no loss | ${perf_trial_duration} | ${rate} | | ... | ${framesize} | ${topology_type} | fail_on_loss=${False} @@ -697,4 +699,27 @@ | | ... | Get Kubernetes logs on all DUTs | ${nodes} | csit | | Run Keyword If Test Failed | | ... | Describe Kubernetes resource on all DUTs | ${nodes} | csit -| | Delete Kubernetes resource on all DUTs | ${nodes} | csit
\ No newline at end of file +| | Delete Kubernetes resource on all DUTs | ${nodes} | csit + +| Tear down performance test with SRv6 with encapsulation +| | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \ +| | ... | tests with SRv6 with encapsulation feature used. +| | ... +| | ... | *Arguments:* +| | ... | - rate - Rate for sending packets. Type: string +| | ... | - framesize - L2 Frame Size [B]. Type: integer +| | ... | - traffic_profile - Traffic profile. Type: string +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Tear down performance test with MACIP ACL \| 100000pps \| 64 \ +| | ... | \| ${traffic_profile} \| +| | ... +| | [Arguments] | ${rate} | ${framesize} | ${traffic_profile} +| | ... +| | Tear down performance discovery test | ${rate} | ${framesize} +| | ... | ${traffic_profile} +| | Run Keyword If Test Failed | Show SR Policies on all DUTs | ${nodes} +| | Run Keyword If Test Failed +| | ... | Show SR Steering Policies on all DUTs | ${nodes} +| | Run Keyword If Test Failed | Show SR LocalSIDs on all DUTs | ${nodes} diff --git a/resources/libraries/robot/performance/performance_utils.robot b/resources/libraries/robot/performance/performance_utils.robot index 6d6413d966..88826a7c9b 100644 --- a/resources/libraries/robot/performance/performance_utils.robot +++ b/resources/libraries/robot/performance/performance_utils.robot @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. +# Copyright (c) 2018 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: @@ -21,6 +21,7 @@ | Library | resources.libraries.python.VhostUser | Library | resources.libraries.python.TrafficGenerator | Library | resources.libraries.python.TrafficGenerator.TGDropRateSearchImpl +| Library | resources.libraries.python.Trace | Resource | resources/libraries/robot/shared/default.robot | Resource | resources/libraries/robot/shared/interfaces.robot | Resource | resources/libraries/robot/shared/counters.robot @@ -82,8 +83,8 @@ | | ... | Return TRUE if variable DPDK_TEST exist, otherwise FALSE. | | ${ret} | ${tmp}= | Run Keyword And Ignore Error | | ... | Variable Should Exist | ${DPDK_TEST} -| | Return From Keyword If | "${ret}" == "PASS" | ${TRUE} -| | Return From Keyword | ${FALSE} +| | Return From Keyword If | "${ret}" == "PASS" | ${True} +| | Return From Keyword | ${False} | Find NDR using linear search and pps | | [Documentation] @@ -452,10 +453,10 @@ | | ... | | Return From Keyword If | ${rate} <= 10000 | ${-1} | | ${ret}= | Is DPDK performance test -| | Run Keyword If | ${ret}==${FALSE} | Clear all counters on all DUTs +| | Run Keyword If | ${ret}==${False} | Clear all counters on all DUTs | | Send traffic on tg | ${duration} | ${rate}pps | ${framesize} | | ... | ${topology_type} | warmup_time=0 -| | Run Keyword If | ${ret}==${FALSE} | Show statistics on all DUTs | ${nodes} +| | Run Keyword If | ${ret}==${False} | Show statistics on all DUTs | ${nodes} | | Run keyword and return | Get latency | Traffic should pass with no loss @@ -482,10 +483,14 @@ | | Clear and show runtime counters with running traffic | ${duration} | | ... | ${rate} | ${framesize} | ${topology_type} | | ${ret}= | Is DPDK performance test -| | Run Keyword If | ${ret}==${FALSE} | Clear all counters on all DUTs +| | Run Keyword If | ${ret}==${False} | Clear all counters on all DUTs +| | Run Keyword If | ${ret}==${False} and ${pkt_trace}==${True} +| | ... | VPP Enable Traces On All DUTs | ${nodes} | | Send traffic on tg | ${duration} | ${rate} | ${framesize} | | ... | ${topology_type} | warmup_time=0 -| | Run Keyword If | ${ret}==${FALSE} | Show statistics on all DUTs | ${nodes} +| | Run Keyword If | ${ret}==${False} | Show statistics on all DUTs | ${nodes} +| | Run Keyword If | ${ret}==${False} and ${pkt_trace}==${True} +| | ... | Show Packet Trace On All Duts | ${nodes} | | Run Keyword If | ${fail_on_loss} | No traffic loss occurred | Traffic should pass with partial loss @@ -513,10 +518,14 @@ | | Clear and show runtime counters with running traffic | ${duration} | | ... | ${rate} | ${framesize} | ${topology_type} | | ${ret}= | Is DPDK performance test -| | Run Keyword If | ${ret}==${FALSE} | Clear all counters on all DUTs +| | Run Keyword If | ${ret}==${False} | Clear all counters on all DUTs +| | Run Keyword If | ${ret}==${False} and ${pkt_trace}==${True} +| | ... | VPP Enable Traces On All DUTs | ${nodes} | | Send traffic on tg | ${duration} | ${rate} | ${framesize} | | ... | ${topology_type} | warmup_time=0 -| | Run Keyword If | ${ret}==${FALSE} | Show statistics on all DUTs | ${nodes} +| | Run Keyword If | ${ret}==${False} | Show statistics on all DUTs | ${nodes} +| | Run Keyword If | ${ret}==${False} and ${pkt_trace}==${True} +| | ... | Show Packet Trace On All Duts | ${nodes} | | Run Keyword If | ${fail_on_loss} | Partial traffic loss accepted | | ... | ${loss_acceptance} | ${loss_acceptance_type} @@ -542,9 +551,9 @@ | | Send traffic on tg | -1 | ${rate} | ${framesize} | ${topology_type} | | ... | warmup_time=0 | async_call=${True} | latency=${False} | | ${ret}= | Is DPDK performance test -| | Run Keyword If | ${ret}==${FALSE} +| | Run Keyword If | ${ret}==${False} | | ... | Clear runtime counters on all DUTs | ${nodes} | | Sleep | ${duration} -| | Run Keyword If | ${ret}==${FALSE} +| | Run Keyword If | ${ret}==${False} | | ... | Show runtime counters on all DUTs | ${nodes} | | Stop traffic on tg |