aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/shared/container.robot
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/robot/shared/container.robot')
-rw-r--r--resources/libraries/robot/shared/container.robot31
1 files changed, 31 insertions, 0 deletions
diff --git a/resources/libraries/robot/shared/container.robot b/resources/libraries/robot/shared/container.robot
index 9f08e6b1d4..dbcf690b72 100644
--- a/resources/libraries/robot/shared/container.robot
+++ b/resources/libraries/robot/shared/container.robot
@@ -371,3 +371,34 @@
| | END
| | Append To List | ${container_groups} | ${container_group}
| | Save VPP PIDs
+
+| Start vswitch containers
+| | [Documentation]
+| | ... | Configure and start multiple vswitch in container on all DUTs.
+| |
+| | ... | *Arguments:*
+| | ... | - phy_cores - Number of physical cores to use. Type: integer
+| | ... | - rx_queues: Number of RX queues. Type: integer
+| |
+| | [Arguments] | ${phy_cores} | ${rx_queues}=${None}
+| |
+| | Set Test Variable | @{container_groups} | @{EMPTY}
+| | Set Test Variable | ${container_group} | VSWITCH
+| | Import Library | resources.libraries.python.ContainerUtils.ContainerManager
+| | ... | engine=${container_engine} | WITH NAME | VSWITCH
+| | Stop VPP service on all DUTs | ${nodes}
+| | FOR | ${dut} | IN | @{duts}
+| | | FOR | ${i} | IN RANGE | 1 | ${${nic_pfs}//${2}+1}
+| | | | Construct container on DUT | ${dut}
+| | | | ... | nf_chains=${1} | nf_nodes=${${nic_pfs}//${2}}
+| | | | ... | nf_chain=${1} | nf_node=${i}
+| | | | ... | auto_scale=${False} | pinning=${False}
+| | | END
+| | END
+| | Run Keyword | VSWITCH.Acquire all containers
+| | Run Keyword | VSWITCH.Create all containers
+| | Run Keyword | VSWITCH.Configure vpp in all containers
+| | ... | vswitch_ip4scale | nodes=${nodes} | rts_per_flow=${rts_per_flow}
+| | Run Keyword | VSWITCH.Start VPP In All Containers
+| | Append To List | ${container_groups} | VSWITCH
+| | Save VPP PIDs