aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2018-05-14 13:22:42 +0200
committerPeter Mikus <pmikus@cisco.com>2018-06-08 07:44:26 +0000
commit28b344a6ade7624278835cff242b3e0c9d891346 (patch)
treec191837a72b62ea1a70b5b007890530c32b6f3b0 /resources/libraries/robot
parent5b9b416f2f073a4102f3dc5ba219c81505e092ed (diff)
CSIT-1081 Container VPP configuration refactor
Adopt code for various topology configurations. Change-Id: Iaf9d7995ab8cd06da0c56c5e5664d57d19e74d7c Signed-off-by: Peter Mikus <pmikus@cisco.com>
Diffstat (limited to 'resources/libraries/robot')
-rw-r--r--resources/libraries/robot/performance/performance_configuration.robot92
-rw-r--r--resources/libraries/robot/shared/container.robot3
-rw-r--r--resources/libraries/robot/shared/memif.robot30
3 files changed, 118 insertions, 7 deletions
diff --git a/resources/libraries/robot/performance/performance_configuration.robot b/resources/libraries/robot/performance/performance_configuration.robot
index 0eb4e612df..c2f591ad0c 100644
--- a/resources/libraries/robot/performance/performance_configuration.robot
+++ b/resources/libraries/robot/performance/performance_configuration.robot
@@ -1712,6 +1712,18 @@
| | Set Test Variable | ${dut2_if1_pci}
| | Set Test Variable | ${dut2_if2_pci}
+| Add single PCI device to DUTs in 3-node single link topology
+| | [Documentation]
+| | ... | Add single (first) PCI device on DUT1 to VPP configuration file.
+| | ... | Add single (last) PCI device on DUT2 to VPP configuration file.
+| | ...
+| | ${dut1_if1_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if1}
+| | ${dut2_if2_pci}= | Get Interface PCI Addr | ${dut2} | ${dut2_if2}
+| | Run keyword | DUT1.Add DPDK Dev | ${dut1_if1_pci}
+| | Run keyword | DUT2.Add DPDK Dev | ${dut2_if2_pci}
+| | Set Test Variable | ${dut1_if1_pci}
+| | Set Test Variable | ${dut2_if2_pci}
+
| Add PCI devices to DUTs in 2-node single link topology
| | [Documentation]
| | ... | Add PCI devices to VPP configuration file.
@@ -1722,6 +1734,14 @@
| | Set Test Variable | ${dut1_if1_pci}
| | Set Test Variable | ${dut1_if2_pci}
+| Add single PCI device to DUTs in 2-node single link topology
+| | [Documentation]
+| | ... | Add single (first) PCI device on DUT1 to VPP configuration file.
+| | ...
+| | ${dut1_if1_pci}= | Get Interface PCI Addr | ${dut1} | ${dut1_if1}
+| | Run keyword | DUT1.Add DPDK Dev | ${dut1_if1_pci}
+| | Set Test Variable | ${dut1_if1_pci}
+
| Add VLAN Strip Offload switch off between DUTs in 3-node single link topology
| | [Documentation]
| | ... | Add VLAN Strip Offload switch off on PCI devices between DUTs to VPP
@@ -2504,9 +2524,7 @@
| | | Run Keyword If | ${number}==${nr} | Configure L2XC
| | | ... | ${dut2} | ${dut2-memif-${number}-if2} | ${dut2_if2}
| | All Vpp Interfaces Ready Wait | ${nodes}
-| | ${duts}= | Get Matches | ${nodes} | DUT*
-| | :FOR | ${dut} | IN | @{duts}
-| | | Show Memif | ${nodes['${dut}']}
+| | Show Memif on all DUTs | ${nodes}
| Initialize L2 Bridge Domain for '${nr}' memif pairs and '${rxq}' rxqueues in 3-node circular topology
| | [Documentation]
@@ -2552,6 +2570,68 @@
| | | Add interface to bridge domain | ${dut2}
| | | ... | ${dut2-memif-${number}-if2} | ${bd_id2}
| | All Vpp Interfaces Ready Wait | ${nodes}
-| | ${duts}= | Get Matches | ${nodes} | DUT*
-| | :FOR | ${dut} | IN | @{duts}
-| | | Show Memif | ${nodes['${dut}']}
+| | Show Memif on all DUTs | ${nodes}
+
+| Initialize L2 xconnect for single memif in 3-node circular topology
+| | [Documentation]
+| | ... | Create single Memif interface on all defined VPP nodes. Cross
+| | ... | connect Memif interface with one physical interface.
+| | ...
+| | ... | *Arguments:*
+| | ... | - ${rxq} - Number of Memif RX queues. Type: integer
+| | ... | - ${number} - Memif ID. Type: integer
+| | ...
+| | ... | *Note:*
+| | ... | Socket paths for Memif are defined in following format:
+| | ... | - /tmp/memif-DUT1_VNF${number}-${sid}
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Initialize L2 xconnect for single memif in 3-node circular \
+| | ... | topology \| 1 \| 1 \|
+| | ...
+| | [Arguments] | ${rxq}=${1} | ${number}=${1}
+| | ${sock}= | Set Variable | memif-DUT1_VNF
+| | Set up single memif interface on DUT node | ${dut1} | ${sock}
+| | ... | ${number} | dut1-memif-${number}-if1 | ${rxq} | ${rxq}
+| | Configure L2XC | ${dut1} | ${dut1_if1} | ${dut1-memif-${number}-if1}
+| | ${sock}= | Set Variable | memif-DUT2_VNF
+| | Set up single memif interface on DUT node | ${dut2} | ${sock}
+| | ... | ${number} | dut2-memif-${number}-if1 | ${rxq} | ${rxq}
+| | Configure L2XC | ${dut2} | ${dut2_if2} | ${dut2-memif-${number}-if1}
+| | All Vpp Interfaces Ready Wait | ${nodes}
+| | Show Memif on all DUTs | ${nodes}
+
+| Initialize L2 Bridge Domain for single memif in 3-node circular topology
+| | [Documentation]
+| | ... | Create single Memif interface on all defined VPP nodes. Put Memif
+| | ... | interface to separate L2 bridge domain with one physical interface.
+| | ...
+| | ... | *Arguments:*
+| | ... | - ${rxq} - Number of Memif RX queues. Type: integer
+| | ... | - ${number} - Memif ID. Type: integer
+| | ...
+| | ... | *Note:*
+| | ... | Socket paths for Memif are defined in following format:
+| | ... | - /tmp/memif-DUT1_VNF${number}-${sid}
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Initialize L2 Bridge Domain for single memif in 3-node circular \
+| | ... | topology \| 1 \| 1 \|
+| | ...
+| | [Arguments] | ${rxq}=${1} | ${number}=${1}
+| | ${sock}= | Set Variable | memif-DUT1_VNF
+| | Set up single memif interface on DUT node | ${dut1} | ${sock}
+| | ... | ${number} | dut1-memif-${number}-if1 | ${rxq} | ${rxq}
+| | Add interface to bridge domain | ${dut1} | ${dut1_if1} | ${number}
+| | Add interface to bridge domain | ${dut1} | ${dut1-memif-${number}-if1}
+| | ... | ${number}
+| | ${sock}= | Set Variable | memif-DUT2_VNF
+| | Set up single memif interface on DUT node | ${dut2} | ${sock}
+| | ... | ${number} | dut2-memif-${number}-if1 | ${rxq} | ${rxq}
+| | Add interface to bridge domain | ${dut2} | ${dut2_if2} | ${number}
+| | Add interface to bridge domain | ${dut2} | ${dut2-memif-${number}-if1}
+| | ... | ${number}
+| | All Vpp Interfaces Ready Wait | ${nodes}
+| | Show Memif on all DUTs | ${nodes}
diff --git a/resources/libraries/robot/shared/container.robot b/resources/libraries/robot/shared/container.robot
index b44e4386a6..201cadcb73 100644
--- a/resources/libraries/robot/shared/container.robot
+++ b/resources/libraries/robot/shared/container.robot
@@ -109,7 +109,8 @@
| | ... | group on all DUT nodes.
| | ...
| | Run Keyword | ${group}.Configure VPP In All Containers
-| | ... | memif_create_cnt.vat
+| | ... | chain_topology=${container_chain_topology}
+| | ... | dut1_if=${dut1_if2} | dut2_if=${dut2_if1}
| Stop all '${group}' containers
| | [Documentation] | Stop all container(s) in specific container group on all
diff --git a/resources/libraries/robot/shared/memif.robot b/resources/libraries/robot/shared/memif.robot
index 172376ffde..ea080a1b83 100644
--- a/resources/libraries/robot/shared/memif.robot
+++ b/resources/libraries/robot/shared/memif.robot
@@ -59,3 +59,33 @@
| | Set Interface State | ${dut_node} | ${memif_2} | up
| | Set Test Variable | ${${memif_if1}} | ${memif_1}
| | Set Test Variable | ${${memif_if2}} | ${memif_2}
+
+| Set up single memif interface on DUT node
+| | [Documentation] | Create single Memif interface on given VPP node.
+| | ...
+| | ... | *Arguments:*
+| | ... | - ${dut_node} - DUT node. Type: dictionary
+| | ... | - ${filename} - Socket filename for Memif interface. Type: string
+| | ... | - ${mid} - Memif interface ID. Type: integer
+| | ... | - ${memif_if} - Name of the Memif interface (Optional).
+| | ... | Type: string
+| | ... | - ${rxq} - RX queues. Type: integer
+| | ... | - ${txq} - TX queues. Type: integer
+| | ... | - ${role} - Memif role. Type: string
+| | ...
+| | ... | _NOTE:_ This KW sets following test case variable:
+| | ... | - ${${memif_if}} - Memif interface.
+| | ...
+| | ... | *Example:*
+| | ...
+| | ... | \| Set up single memif interface on DUT node \
+| | ... | \| ${nodes['DUT1']} \| sock1 \| 1 \| dut1_memif_if1 \| 1 \| 1 \
+| | ... | \| slave \|
+| | ...
+| | [Arguments] | ${dut_node} | ${filename} | ${mid}=${1}
+| | ... | ${memif_if}=memif_if1 | ${rxq}=${1} | ${txq}=${1} | ${role}=slave
+| | ${sid}= | Evaluate | (${mid}*2)-1
+| | ${memif}= | Create memif interface | ${dut_node} | ${filename}${mid}-${sid}
+| | ... | ${mid} | ${sid} | rxq=${rxq} | txq=${txq} | role=${role}
+| | Set Interface State | ${dut_node} | ${memif} | up
+| | Set Test Variable | ${${memif_if}} | ${memif}