feat(core): Adjust T-Rex for external topologies
[csit.git] / resources / libraries / robot / shared / container.robot
index 9f08e6b..dbcf690 100644 (file)
 | | 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