aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/robot')
-rw-r--r--resources/libraries/robot/default.robot62
-rw-r--r--resources/libraries/robot/fds/default.robot64
-rw-r--r--resources/libraries/robot/honeycomb/persistence.robot2
-rw-r--r--resources/libraries/robot/honeycomb/provider_backbone_bridge.robot6
-rw-r--r--resources/libraries/robot/ipsec.robot82
-rw-r--r--resources/libraries/robot/performance.robot45
6 files changed, 230 insertions, 31 deletions
diff --git a/resources/libraries/robot/default.robot b/resources/libraries/robot/default.robot
index 932fcaee07..68d399702a 100644
--- a/resources/libraries/robot/default.robot
+++ b/resources/libraries/robot/default.robot
@@ -12,6 +12,7 @@
# limitations under the License.
*** Settings ***
+| Resource | resources/libraries/robot/qemu.robot
| Variables | resources/libraries/python/topology.py
| Variables | resources/libraries/python/VatHistory.py
| Library | resources.libraries.python.topology.Topology
@@ -21,6 +22,7 @@
| Library | resources.libraries.python.SchedUtils
| Library | resources.libraries.python.TGSetup
| Library | resources.libraries.python.L2Util
+| Library | resources.libraries.python.Tap
| Library | resources/libraries/python/VppConfigGenerator.py
| Library | resources/libraries/python/VppCounters.py
| Library | Collections
@@ -293,3 +295,63 @@
| | Show VAT History On All DUTs | ${nodes}
| | Vpp Show Errors On All DUTs | ${nodes}
| | Verify VPP PID in Teardown
+
+| Tear down LISP functional test
+| | [Documentation] | Common test teardown for functional tests with LISP.
+| | ...
+| | Show Packet Trace on All DUTs | ${nodes}
+| | Show VAT History On All DUTs | ${nodes}
+| | Show Vpp Settings | ${nodes['DUT1']}
+| | Show Vpp Settings | ${nodes['DUT2']}
+| | Vpp Show Errors On All DUTs | ${nodes}
+| | Verify VPP PID in Teardown
+
+| Tear down LISP functional test with QEMU
+| | [Documentation] | Common test teardown for functional tests with LISP and\
+| | ... | QEMU.
+| | ...
+| | ... | *Arguments:*
+| | ... | - vm_node - VM to stop. Type: string
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Tear down LISP functional test with QEMU \| ${vm_node} \|
+| | ...
+| | [Arguments] | ${vm_node}
+| | ...
+| | Show Packet Trace on All DUTs | ${nodes}
+| | Show VAT History On All DUTs | ${nodes}
+| | Show Vpp Settings | ${nodes['DUT1']}
+| | Show Vpp Settings | ${nodes['DUT2']}
+| | Vpp Show Errors On All DUTs | ${nodes}
+| | Stop and clear QEMU | ${nodes['DUT1']} | ${vm_node}
+| | Verify VPP PID in Teardown
+
+| Set up TAP functional test
+| | [Documentation] | Common test setup for functional tests with TAP.
+| | ...
+| | Set up functional test
+| | Clean Up Namespaces | ${nodes['DUT1']}
+
+| Tear down TAP functional test
+| | [Documentation] | Common test teardown for functional tests with TAP.
+| | ...
+| | Tear down functional test
+| | Clean Up Namespaces | ${nodes['DUT1']}
+
+| Tear down TAP functional test with Linux bridge
+| | [Documentation] | Common test teardown for functional tests with TAP and
+| | ... | a Linux bridge.
+| | ...
+| | ... | *Arguments:*
+| | ... | - bid_TAP - Bridge name. Type: string
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Tear down TAP functional test with Linux bridge \| ${bid_TAP} \|
+| | ...
+| | [Arguments] | ${bid_TAP}
+| | ...
+| | Tear down functional test
+| | Linux Del Bridge | ${nodes['DUT1']} | ${bid_TAP}
+| | Clean Up Namespaces | ${nodes['DUT1']}
diff --git a/resources/libraries/robot/fds/default.robot b/resources/libraries/robot/fds/default.robot
new file mode 100644
index 0000000000..83657e9fb4
--- /dev/null
+++ b/resources/libraries/robot/fds/default.robot
@@ -0,0 +1,64 @@
+# Copyright (c) 2017 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:
+#
+# 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 ***
+| Resource | resources/libraries/robot/default.robot
+| Resource | resources/libraries/robot/double_qemu_setup.robot
+| Library | resources.libraries.python.VatHistory
+| Library | resources.libraries.python.Trace
+| ...
+| Documentation | Test setup and test teardown of FDS functional tests.
+
+*** Keywords ***
+| Set up FDS functional test
+| | [Documentation]
+| | ... |
+| | ...
+| | ... | *Arguments:*
+| | ... | - nodes - Nodes to reset VAT command history for. Type: dictionary
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Set up FDS functional test \| ${nodes} \|
+| | ...
+| | [Arguments] | ${nodes}
+| | ...
+| | Configure all DUTs before test
+| | Save VPP PIDs
+| | Configure all TGs for traffic script
+| | Reset VAT History On All DUTs | ${nodes}
+
+| Tear down FDS functional test
+| | [Documentation]
+| | ... |
+| | ...
+| | ... | *Arguments:*
+| | ... | - nodes - Nodes to reset VAT command history for. Type: dictionary
+| | ... | - dut1_node - Node nr 1 where to clean qemu. Type: dictionary
+| | ... | - qemu_node1 - VM nr 1 node info dictionary. Type: string
+| | ... | - dut2_node - Node nr 2 where to clean qemu. Type: dictionary
+| | ... | - qemu_node2 - VM nr 2 node info dictionary. Type: string
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Tear down FDS functional test \| ${nodes}\
+| | ... | \| ${dut1_node} \| ${qemu_node1} \| ${dut2_node} \| ${qemu_node2} \|
+| | ...
+| | [Arguments] | ${nodes} | ${dut1_node} | ${qemu_node1} | ${dut2_node}
+| | ... | ${qemu_node2}
+| | ...
+| | Show Packet Trace on All DUTs | ${nodes}
+| | Show VAT History On All DUTs | ${nodes}
+| | Tear down QEMU | ${dut1_node} | ${qemu_node1} | qemu_node1
+| | Tear down QEMU | ${dut2_node} | ${qemu_node2} | qemu_node2
+| | Verify VPP PID in Teardown
diff --git a/resources/libraries/robot/honeycomb/persistence.robot b/resources/libraries/robot/honeycomb/persistence.robot
index 69f5f92d0d..6fe439a759 100644
--- a/resources/libraries/robot/honeycomb/persistence.robot
+++ b/resources/libraries/robot/honeycomb/persistence.robot
@@ -70,7 +70,7 @@
| | Wait until keyword succeeds | 2min | 20sec
| | ... | Check Honeycomb startup state | ${node}
-| Restart Honeycomb and VPP
+| Restart Honeycomb and VPP in pesistence test
| | [Documentation] | Stops Honeycomb, restarts VPP and then starts Honeycomb\
| | ... | again.
| | ...
diff --git a/resources/libraries/robot/honeycomb/provider_backbone_bridge.robot b/resources/libraries/robot/honeycomb/provider_backbone_bridge.robot
index bb8aa78f41..92145f82fa 100644
--- a/resources/libraries/robot/honeycomb/provider_backbone_bridge.robot
+++ b/resources/libraries/robot/honeycomb/provider_backbone_bridge.robot
@@ -28,7 +28,7 @@
| | ... | Type - dictionary
| | ...
| | ... | *Example:*
-| | ... | \| Honeycomb creates PBB sub interface \| ${node} \| ${super_if}\
+| | ... | \| Honeycomb creates PBB sub-interface \| ${node} \| ${super_if}\
| | ... | \| ${cfg_pbb_sub_if_1} \|
| | ...
| | [Arguments] | ${node} | ${super_if} | ${params}
@@ -47,7 +47,7 @@
| | ... | - sub_if_id - Sub-interface ID. Type: string
| | ...
| | ... | *Example:*
-| | ... | \| Honeycomb Removes PBB sub interface\
+| | ... | \| Honeycomb removes PBB sub-interface\
| | ... | \| ${node} \| ${super_if} \|
| | ...
| | [Arguments] | ${node} | ${super_if}
@@ -66,7 +66,7 @@
| | ... | Type - dictionary
| | ...
| | ... | *Example:*
-| | ... | \| Honeycomb fails to create PBB sub interface\
+| | ... | \| Honeycomb fails to create PBB sub-interface\
| | ... | \| ${node} \| ${super_if} \| ${cfg_pbb_sub_if_no_vlan_tag} \|
| | ...
| | [Arguments] | ${node} | ${super_if} | ${params}
diff --git a/resources/libraries/robot/ipsec.robot b/resources/libraries/robot/ipsec.robot
index 7b8fab5b66..73f7179f30 100644
--- a/resources/libraries/robot/ipsec.robot
+++ b/resources/libraries/robot/ipsec.robot
@@ -95,12 +95,12 @@
| | ... | \| Configure topology for IPv4 IPsec testing \|
| | Configure path for IPSec test
| | Set Interface Address | ${dut_node} | ${dut_if} | ${dut_if_ip4}
-| | ... | ${ip4_plen}
+| | ... | ${ip4_plen}
| | Set Interface Address | ${dut_node} | ${dut_lo} | ${dut_lo_ip4}
-| | ... | ${ip4_plen}
+| | ... | ${ip4_plen}
| | dut1_v4.Set Arp | ${dut_if} | ${tg_if_ip4} | ${tg_if_mac}
| | Vpp Route Add | ${dut_node} | ${tg_lo_ip4} | ${ip4_plen} | ${tg_if_ip4}
-| | ... | ${dut_if}
+| | ... | ${dut_if}
| | Set Test Variable | ${dut_tun_ip} | ${dut_if_ip4}
| | Set Test Variable | ${dut_src_ip} | ${dut_lo_ip4}
| | Set Test Variable | ${tg_tun_ip} | ${tg_if_ip4}
@@ -123,7 +123,7 @@
| | Add IP Neighbor | ${dut_node} | ${dut_if} | ${tg_if_ip6} | ${tg_if_mac}
| | Vpp All RA Suppress Link Layer | ${nodes}
| | Vpp Route Add | ${dut_node} | ${tg_lo_ip6} | ${ip6_plen_rt} | ${tg_if_ip6}
-| | ... | ${dut_if}
+| | ... | ${dut_if}
| | Set Test Variable | ${dut_tun_ip} | ${dut_if_ip6}
| | Set Test Variable | ${dut_src_ip} | ${dut_lo_ip6}
| | Set Test Variable | ${tg_tun_ip} | ${tg_if_ip6}
@@ -158,33 +158,33 @@
| | ... | \| ${auth_alg} \| twentybytessecretkey \| ${1000} \| ${1001} \
| | ... | \| 192.168.4.4 \| 192.168.3.3 \| 192.168.100.3 \| 192.168.100.2 \|
| | [Arguments] | ${node} | ${interface} | ${crypto_alg} | ${crypto_key}
-| | ... | ${integ_alg} | ${integ_key} | ${l_spi} | ${r_spi} | ${l_ip}
-| | ... | ${r_ip} | ${l_tunnel}=${None} | ${r_tunnel}=${None}
+| | ... | ${integ_alg} | ${integ_key} | ${l_spi} | ${r_spi} | ${l_ip}
+| | ... | ${r_ip} | ${l_tunnel}=${None} | ${r_tunnel}=${None}
| | Set Test Variable | ${l_sa_id} | ${10}
| | Set Test Variable | ${r_sa_id} | ${20}
| | ${spd_id}= | Set Variable | ${1}
| | ${p_hi}= | Set Variable | ${100}
| | ${p_lo}= | Set Variable | ${10}
| | VPP IPsec Add SAD Entry | ${node} | ${l_sa_id} | ${l_spi} | ${crypto_alg}
-| | ... | ${crypto_key} | ${integ_alg} | ${integ_key}
-| | ... | ${l_tunnel} | ${r_tunnel}
+| | ... | ${crypto_key} | ${integ_alg} | ${integ_key}
+| | ... | ${l_tunnel} | ${r_tunnel}
| | VPP IPsec Add SAD Entry | ${node} | ${r_sa_id} | ${r_spi} | ${crypto_alg}
-| | ... | ${crypto_key} | ${integ_alg} | ${integ_key}
-| | ... | ${r_tunnel} | ${l_tunnel}
+| | ... | ${crypto_key} | ${integ_alg} | ${integ_key}
+| | ... | ${r_tunnel} | ${l_tunnel}
| | VPP IPsec Add SPD | ${node} | ${spd_id}
| | VPP IPsec SPD Add If | ${node} | ${spd_id} | ${interface}
| | ${action}= | Policy Action Bypass
| | VPP IPsec SPD Add Entry | ${node} | ${spd_id} | ${p_hi} | ${action}
-| | ... | inbound=${TRUE} | proto=${ESP_PROTO}
+| | ... | inbound=${TRUE} | proto=${ESP_PROTO}
| | VPP IPsec SPD Add Entry | ${node} | ${spd_id} | ${p_hi} | ${action}
-| | ... | inbound=${FALSE} | proto=${ESP_PROTO}
+| | ... | inbound=${FALSE} | proto=${ESP_PROTO}
| | ${action}= | Policy Action Protect
| | VPP IPsec SPD Add Entry | ${node} | ${spd_id} | ${p_lo} | ${action}
-| | ... | sa_id=${r_sa_id} | laddr_range=${l_ip}
-| | ... | raddr_range=${r_ip} | inbound=${TRUE}
+| | ... | sa_id=${r_sa_id} | laddr_range=${l_ip}
+| | ... | raddr_range=${r_ip} | inbound=${TRUE}
| | VPP IPsec SPD Add Entry | ${node} | ${spd_id} | ${p_lo} | ${action}
-| | ... | sa_id=${l_sa_id} | laddr_range=${l_ip}
-| | ... | raddr_range=${r_ip} | inbound=${FALSE}
+| | ... | sa_id=${l_sa_id} | laddr_range=${l_ip}
+| | ... | raddr_range=${r_ip} | inbound=${FALSE}
| Update IPSec SA keys
| | [Documentation] | Update IPsec SA keys on VPP node.
@@ -200,15 +200,15 @@
| | ... | \| Update IPSec SA keys \| ${nodes['DUT1']} \
| | ... | \| 10 \| 20 \| sixteenbytes_key \| twentybytessecretkey \|
| | [Arguments] | ${node} | ${l_sa_id} | ${r_sa_id} | ${crypto_key}
-| | ... | ${integ_key}
+| | ... | ${integ_key}
| | VPP IPsec SA Set Key | ${dut_node} | ${l_sa_id} | ${crypto_key}
-| | ... | ${integ_key}
+| | ... | ${integ_key}
| | VPP IPsec SA Set Key | ${dut_node} | ${r_sa_id} | ${crypto_key}
-| | ... | ${integ_key}
+| | ... | ${integ_key}
| Send IPsec Packet and verify ESP encapsulation in received packet
| | [Documentation] | Send IPsec packet from TG to DUT. Receive IPsec packet\
-| | ... | from DUT on TG and verify ESP encapsulation.
+| | ... | from DUT on TG and verify ESP encapsulation.
| | ...
| | ... | *Arguments:*
| | ... | - node - TG node. Type: dictionary
@@ -228,25 +228,53 @@
| | ... | *Example:*
| | ... | \| ${encr_alg}= \| Crypto Alg AES CBC 128 \|
| | ... | \| ${auth_alg}= \| Integ Alg SHA1 96 \|
-| | ... | \| Send IPsec Packet and verify ESP encapsulation in received packet \| ${nodes['TG']} \| eth1 \
+| | ... | \| Send IPsec Packet and verify ESP encapsulation in received packet\
+| | ... | \| ${nodes['TG']} \| eth1 \
| | ... | \| 52:54:00:d4:d8:22 \| ${encr_alg} \| sixteenbytes_key \
| | ... | \| ${auth_alg} \| twentybytessecretkey \| ${1001} \| ${1000} \
| | ... | \| 192.168.3.3 \| 192.168.4.4 \| 192.168.100.2 \| 192.168.100.3 \|
| | [Arguments] | ${node} | ${interface} | ${dst_mac} | ${crypto_alg}
-| | ... | ${crypto_key} | ${integ_alg} | ${integ_key} | ${l_spi}
-| | ... | ${r_spi} | ${l_ip} | ${r_ip} | ${l_tunnel}=${None}
-| | ... | ${r_tunnel}=${None}
+| | ... | ${crypto_key} | ${integ_alg} | ${integ_key} | ${l_spi}
+| | ... | ${r_spi} | ${l_ip} | ${r_ip} | ${l_tunnel}=${None}
+| | ... | ${r_tunnel}=${None}
| | ${src_mac}= | Get Interface Mac | ${node} | ${interface}
| | ${if_name}= | Get Interface Name | ${node} | ${interface}
| | ${args}= | Traffic Script Gen Arg | ${if_name} | ${if_name} | ${src_mac}
-| | ... | ${dst_mac} | ${l_ip} | ${r_ip}
+| | ... | ${dst_mac} | ${l_ip} | ${r_ip}
| | ${crypto_alg_str}= | Get Crypto Alg Scapy Name | ${crypto_alg}
| | ${integ_alg_str}= | Get Integ Alg Scapy Name | ${integ_alg}
| | ${args}= | Catenate | ${args} | --crypto_alg ${crypto_alg_str}
-| | ... | --crypto_key ${crypto_key} | --integ_alg ${integ_alg_str}
-| | ... | --integ_key ${integ_key} | --l_spi ${l_spi} | --r_spi ${r_spi}
+| | ... | --crypto_key ${crypto_key} | --integ_alg ${integ_alg_str}
+| | ... | --integ_key ${integ_key} | --l_spi ${l_spi} | --r_spi ${r_spi}
| | ${args}= | Set Variable If | "${l_tunnel}" == "${None}" | ${args}
| | ... | ${args} --src_tun ${l_tunnel}
| | ${args}= | Set Variable If | "${r_tunnel}" == "${None}" | ${args}
| | ... | ${args} --dst_tun ${r_tunnel}
| | Run Traffic Script On Node | ipsec.py | ${node} | ${args}
+
+| Set up IPv4 IPSec functional test
+| | [Documentation]
+| | ... | Set up IPv4 IPSec functional test
+| | ...
+| | Set up functional test
+| | Configure topology for IPv4 IPsec testing
+
+| Set up IPv6 IPSec functional test
+| | [Documentation]
+| | ... | Set up IPv6 IPSec functional test
+| | ...
+| | Set up functional test
+| | Configure topology for IPv6 IPsec testing
+
+| Tear down IPSec functional test
+| | [Documentation]
+| | ... | Tear down IPSec functional test
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Tear down IPSec functional test \| ${dut_node} \|
+| | ...
+| | [Arguments] | ${dut_node}
+| | ...
+| | VPP IPsec Show | ${dut_node}
+| | Tear down functional test
diff --git a/resources/libraries/robot/performance.robot b/resources/libraries/robot/performance.robot
index d0feed277d..b934dc1d96 100644
--- a/resources/libraries/robot/performance.robot
+++ b/resources/libraries/robot/performance.robot
@@ -2518,3 +2518,48 @@
| | ... | Tear down guest VM with dpdk-testpmd | ${dut1} | ${dut1_vm_refs}
| | Run keyword unless | ${dut2_node}==${None}
| | ... | Tear down guest VM with dpdk-testpmd | ${dut2} | ${dut2_vm_refs}
+
+| Set up IPSec performance test suite
+| | [Documentation]
+| | ... | Suite preparation phase that sets default startup configuration of
+| | ... | VPP on all DUTs. Updates interfaces on all nodes and sets global
+| | ... | variables used in test cases based on interface model provided as an
+| | ... | argument. Initializes traffic generator.
+| | ... | Then it configures crypto device and kernel module on all DUTs.
+| | ...
+| | ... | *Arguments:*
+| | ... | - topology_type - Topology type. Type: string
+| | ... | - nic_model - Interface model. Type: string
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Set up IPSec performance test suite \| L2 \
+| | ... | \| Intel-X520-DA2 \|
+| | ...
+| | [Arguments] | ${topology_type} | ${nic_model}
+| | ...
+| | Set up 3-node performance topology with DUT's NIC model
+| | ... | ${topology_type} | ${nic_model}
+| | Configure crypto device on all DUTs | force_init=${True}
+| | Configure kernel module on all DUTs | igb_uio | force_load=${True}
+
+| Tear down performance discovery test with SNAT
+| | [Documentation] | Common test teardown for ndrdisc and pdrdisc performance \
+| | ... | tests with SNAT feature used.
+| | ...
+| | ... | *Arguments:*
+| | ... | - rate - Rate for sending packets. Type: string
+| | ... | - framesize - L2 Frame Size [B]. Type: integer
+| | ... | - topology_type - Topology type. Type: string
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Tear down performance discovery test with SNAT \| 4.0mpps \| 64 \
+| | ... | \| ${traffic_profile} \|
+| | ...
+| | [Arguments] | ${rate} | ${framesize} | ${traffic_profile}
+| | ...
+| | Tear down performance discovery test | ${rate}pps | ${framesize}
+| | ... | ${traffic_profile}
+| | Show SNAT verbose | ${dut1}
+| | Show SNAT verbose | ${dut2}