aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/shared
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries/robot/shared')
-rw-r--r--resources/libraries/robot/shared/container.robot94
-rw-r--r--resources/libraries/robot/shared/default.robot2
-rw-r--r--resources/libraries/robot/shared/memif.robot10
3 files changed, 33 insertions, 73 deletions
diff --git a/resources/libraries/robot/shared/container.robot b/resources/libraries/robot/shared/container.robot
index c8320b7508..6067a81c4e 100644
--- a/resources/libraries/robot/shared/container.robot
+++ b/resources/libraries/robot/shared/container.robot
@@ -31,29 +31,31 @@
| | ... | - auto_scale - If True, use same amount of Dataplane threads for
| | ... | network function as DUT, otherwise use single physical core for
| | ... | every network function. Type: boolean
-| | ... | - nested: Set True if starting nested containers.
-| | ... | Type: boolean, default value: ${False}
+| | ... | - pinning: Set True if CPU pinning should be done on starting
+| | ... | containers. Type: boolean, default value: ${False}
| | ...
| | ... | *Example:*
| | ...
| | ... | \| Construct container on all DUTs \| 1 \| 1 \| 1 \| 1 \| ${True} \|
| | ...
| | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${nf_chain}=${1}
-| | ... | ${nf_node}=${1} | ${auto_scale}=${True} | ${nested}=${False}
+| | ... | ${nf_node}=${1} | ${auto_scale}=${True} | ${pinning}=${True}
| | ...
| | ${nf_dtcr_status} | ${value}= | Run Keyword And Ignore Error
| | ... | Variable Should Exist | ${nf_dtcr}
| | ${nf_dtcr}= | Run Keyword If | '${nf_dtcr_status}' == 'PASS'
| | ... | Set Variable | ${nf_dtcr} | ELSE | Set Variable | ${1}
-| | ${nf_dtc}= | Run Keyword Unless | ${nested}
+| | ${nf_dtc}= | Run Keyword If | ${pinning}
| | ... | Set Variable If | ${auto_scale} | ${cpu_count_int}
| | ... | ${nf_dtc}
| | ${duts}= | Get Matches | ${nodes} | DUT*
| | :FOR | ${dut} | IN | @{duts}
| | | ${nf_id}= | Evaluate | (${nf_chain} - ${1}) * ${nf_nodes} + ${nf_node}
| | | ${env}= | Create List | DEBIAN_FRONTEND=noninteractive
-| | | ${uuid}= | Get Variable Value | ${dcr_uuid} | ${Empty}
-| | | ${root}= | Get Variable Value | ${dcr_root} | ${Empty}
+| | | ${dut1_uuid_length} = | Get Length | ${dut1_uuid}
+| | | ${root}= | Run Keyword If | ${dut1_uuid_length}
+| | | ... | Get Docker Mergeddir | ${nodes['DUT1']} | ${dut1_uuid}
+| | | ... | ELSE | Set Variable | ${EMPTY}
| | | ${mnt}= | Create List
| | | ... | ${root}/tmp/:/mnt/host/
| | | ... | ${root}/dev/vfio/:/dev/vfio/
@@ -62,15 +64,15 @@
| | | ... | ${root}/usr/lib/x86_64-linux-gnu/:/usr/lib/x86_64-linux-gnu/
| | | ... | ${root}/usr/share/vpp/:/usr/share/vpp/
| | | ${nf_cpus}= | Set Variable | ${None}
-| | | ${nf_cpus}= | Run Keyword Unless | ${nested}
+| | | ${nf_cpus}= | Run Keyword If | ${pinning}
| | | ... | Get Affinity NF | ${nodes} | ${dut}
| | | ... | nf_chains=${nf_chains} | nf_nodes=${nf_nodes}
| | | ... | nf_chain=${nf_chain} | nf_node=${nf_node}
| | | ... | vs_dtc=${cpu_count_int} | nf_dtc=${nf_dtc} | nf_dtcr=${nf_dtcr}
| | | &{cont_args}= | Create Dictionary
-| | | ... | name=${dut}_${container_group}${nf_id}${uuid}
+| | | ... | name=${dut}_${container_group}${nf_id}${dut1_uuid}
| | | ... | node=${nodes['${dut}']} | mnt=${mnt} | env=${env}
-| | | Run Keyword Unless | ${nested}
+| | | Run Keyword If | ${pinning}
| | | ... | Set To Dictionary | ${cont_args} | cpuset_cpus=${nf_cpus}
| | | Run Keyword | ${container_group}.Construct container | &{cont_args}
@@ -84,8 +86,8 @@
| | ... | - auto_scale - If True, use same amount of Dataplane threads for
| | ... | network function as DUT, otherwise use single physical core for
| | ... | every network function. Type: boolean
-| | ... | - nested: Set True if starting nested containers.
-| | ... | Type: boolean, default value: ${False}
+| | ... | - pinning: Set True if CPU pinning should be done on starting
+| | ... | containers. Type: boolean, default value: ${False}
| | ...
| | ... | *Example:*
| | ...
@@ -93,38 +95,38 @@
| | ... | \| ${True} \|
| | ...
| | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${nf_chain}=${1}
-| | ... | ${auto_scale}=${True} | ${nested}=${False}
+| | ... | ${auto_scale}=${True} | ${pinning}=${True}
| | ...
| | :FOR | ${nf_node} | IN RANGE | 1 | ${nf_nodes}+1
| | | Construct container on all DUTs | nf_chains=${nf_chains}
| | | ... | nf_nodes=${nf_nodes} | nf_chain=${nf_chain} | nf_node=${nf_node}
-| | | ... | auto_scale=${auto_scale} | nested=${nested}
+| | | ... | auto_scale=${auto_scale} | pinning=${pinning}
| Construct chains of containers on all DUTs
| | [Documentation] | Construct 1..N chains of 1..N CNFs on all DUT nodes.
| | ...
| | ... | *Arguments:*
| | ... | - nf_chains: Total number of chains (Optional). Type: integer, default
-| | ... | value: ${1}
+| | ... | value: ${1}
| | ... | - nf_nodes: Total number of nodes per chain (Optional). Type: integer,
-| | ... | default value: ${1}
+| | ... | default value: ${1}
| | ... | - auto_scale - If True, use same amount of Dataplane threads for
| | ... | network function as DUT, otherwise use single physical core for
| | ... | every network function. Type: boolean
-| | ... | - nested: Set True if starting nested containers.
-| | ... | Type: boolean, default value: ${False}
+| | ... | - pinning: Set True if CPU pinning should be done on starting
+| | ... | containers. Type: boolean, default value: ${True}
| | ...
| | ... | *Example:*
| | ...
| | ... | \| Construct chains of containers on all DUTs \| 1 \| 1 \|
| | ...
| | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
-| | ... | ${nested}=${False}
+| | ... | ${pinning}=${True}
| | ...
| | :FOR | ${nf_chain} | IN RANGE | 1 | ${nf_chains}+1
| | | Construct chain of containers on all DUTs | nf_chains=${nf_chains}
| | | ... | nf_nodes=${nf_nodes} | nf_chain=${nf_chain}
-| | | ... | auto_scale=${auto_scale} | nested=${nested}
+| | | ... | auto_scale=${auto_scale} | pinning=${pinning}
| Acquire all '${group}' containers
| | [Documentation] | Acquire all container(s) in specific container group on
@@ -182,9 +184,9 @@
| | ...
| | Run Keyword | ${group}.Destroy all containers
-| Start containers for performance test
+| Start containers for test
| | [Documentation]
-| | ... | Start containers for performance test.
+| | ... | Start containers for test.
| | ...
| | ... | *Arguments:*
| | ... | - nf_chains: Total number of chains. Type: integer
@@ -192,12 +194,15 @@
| | ... | - auto_scale - If True, use same amount of Dataplane threads for
| | ... | network function as DUT, otherwise use single physical core for
| | ... | every network function. Type: boolean
+| | ... | - pinning: Set True if CPU pinning should be done on starting
+| | ... | containers. Type: boolean, default value: ${False}
| | ...
| | ... | *Example:*
| | ...
-| | ... | \| Start containers for performance test \| 1 \| 1 \|
+| | ... | \| Start containers for test \| 1 \| 1 \|
| | ...
| | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1} | ${auto_scale}=${True}
+| | ... | ${pinning}=${True}
| | ...
| | Set Test Variable | @{container_groups} | @{EMPTY}
| | Set Test Variable | ${container_group} | CNF
@@ -205,50 +210,7 @@
| | Import Library | resources.libraries.python.ContainerUtils.ContainerManager
| | ... | engine=${container_engine} | WITH NAME | ${container_group}
| | Construct chains of containers on all DUTs | ${nf_chains} | ${nf_nodes}
-| | ... | auto_scale=${auto_scale}
-| | Acquire all '${container_group}' containers
-| | Create all '${container_group}' containers
-| | Configure VPP in all '${container_group}' containers
-| | Stop VPP service on all DUTs | ${nodes}
-| | Start VPP in all '${container_group}' containers
-| | Restart VPP service on all DUTs | ${nodes}
-| | Verify VPP on all DUTs | ${nodes}
-| | Save VPP PIDs
-| | Append To List | ${container_groups} | ${container_group}
-
-| Start containers for device test
-| | [Documentation]
-| | ... | Start containers for device test.
-| | ...
-| | ... | *Arguments:*
-| | ... | - nf_chains: Total number of chains (Optional). Type: integer, default
-| | ... | value: ${1}
-| | ... | - nf_nodes: Total number of nodes per chain (Optional). Type: integer,
-| | ... | default value: ${1}
-| | ...
-| | ... | _NOTE:_ This KW sets following test case variables:
-| | ... | - dcr_uuid - Parent container UUID.
-| | ... | - dcr_root - Parent container overlay.
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Set up functional test with containers \| 1 \| 1 \|
-| | ...
-| | [Arguments] | ${nf_chains}=${1} | ${nf_nodes}=${1}
-| | ...
-| | Set Test Variable | @{container_groups} | @{EMPTY}
-| | Set Test Variable | ${container_group} | CNF
-| | Import Library | resources.libraries.python.ContainerUtils.ContainerManager
-| | ... | engine=${container_engine} | WITH NAME | ${container_group}
-| | ...
-| | ${dcr_uuid}= | Get Environment Variable | CSIT_DUT1_UUID
-| | ${dcr_root}= | Run Keyword | Get Docker Mergeddir | ${nodes['DUT1']}
-| | ... | ${dcr_uuid}
-| | Set Test Variable | ${dcr_uuid}
-| | Set Test Variable | ${dcr_root}
-| | ...
-| | Construct chains of containers on all DUTs | ${nf_chains} | ${nf_nodes}
-| | ... | nested=${True}
+| | ... | auto_scale=${auto_scale} | pinning=${pinning}
| | Acquire all '${container_group}' containers
| | Create all '${container_group}' containers
| | Configure VPP in all '${container_group}' containers
diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot
index 31c4ae3e0a..86e124ad62 100644
--- a/resources/libraries/robot/shared/default.robot
+++ b/resources/libraries/robot/shared/default.robot
@@ -24,6 +24,7 @@
| Library | resources.libraries.python.CpuUtils
| Library | resources.libraries.python.DUTSetup
| Library | resources.libraries.python.L2Util
+| Library | resources.libraries.python.Namespaces
| Library | resources.libraries.python.SchedUtils
| Library | resources.libraries.python.Tap
| Library | resources.libraries.python.TGSetup
@@ -43,6 +44,7 @@
| Resource | resources/libraries/robot/shared/suite_setup.robot
| Resource | resources/libraries/robot/shared/test_teardown.robot
| Resource | resources/libraries/robot/shared/test_setup.robot
+| Resource | resources/libraries/robot/shared/traffic.robot
*** Keywords ***
| Show Vpp Errors On All DUTs
diff --git a/resources/libraries/robot/shared/memif.robot b/resources/libraries/robot/shared/memif.robot
index 0b092c2f6a..0fda454764 100644
--- a/resources/libraries/robot/shared/memif.robot
+++ b/resources/libraries/robot/shared/memif.robot
@@ -34,10 +34,6 @@
| | ... | - txq - TX queues; 0 means do not set (Optional). Type: integer,
| | ... | default value: ${1}
| | ... | - role - Memif role (Optional). Type: string, default value: SLAVE
-| | ... | - dcr_uuid - UUID string (including prefix - underscore character) of
-| | ... | DUT1 /tmp volume created outside of the DUT1 docker in case of
-| | ... | vpp-device test. ${EMPTY} value means that /tmp directory is inside
-| | ... | the DUT1 docker. (Optional). Type: string, default value: ${EMPTY}
| | ...
| | ... | _NOTE:_ This KW sets following test case variable:
| | ... | - ${${memif_if1}} - 1st Memif interface.
@@ -55,15 +51,15 @@
| | ...
| | [Arguments] | ${dut_node} | ${filename1} | ${filename2} | ${mid}=${1}
| | ... | ${memif_if1}=memif_if1 | ${memif_if2}=memif_if2 | ${rxq}=${1}
-| | ... | ${txq}=${1} | ${role}=SLAVE | ${dcr_uuid}=${EMPTY}
+| | ... | ${txq}=${1} | ${role}=SLAVE
| | ...
| | ${sid_1}= | Evaluate | (${mid}*2)-1
| | ${sid_2}= | Evaluate | (${mid}*2)
| | ${memif_1}= | Create memif interface | ${dut_node}
-| | ... | ${filename1}${mid}${dcr_uuid}-${sid_1} | ${mid} | ${sid_1}
+| | ... | ${filename1}${mid}${dut1_uuid}-${sid_1} | ${mid} | ${sid_1}
| | ... | rxq=${rxq} | txq=${txq} | role=${role}
| | ${memif_2}= | Create memif interface | ${dut_node}
-| | ... | ${filename2}${mid}${dcr_uuid}-${sid_2} | ${mid} | ${sid_2}
+| | ... | ${filename2}${mid}${dut1_uuid}-${sid_2} | ${mid} | ${sid_2}
| | ... | rxq=${rxq} | txq=${txq} | role=${role}
| | Set Interface State | ${dut_node} | ${memif_1} | up
| | Set Interface State | ${dut_node} | ${memif_2} | up