From 28b344a6ade7624278835cff242b3e0c9d891346 Mon Sep 17 00:00:00 2001 From: Peter Mikus Date: Mon, 14 May 2018 13:22:42 +0200 Subject: CSIT-1081 Container VPP configuration refactor Adopt code for various topology configurations. Change-Id: Iaf9d7995ab8cd06da0c56c5e5664d57d19e74d7c Signed-off-by: Peter Mikus --- resources/libraries/robot/shared/container.robot | 3 ++- resources/libraries/robot/shared/memif.robot | 30 ++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) (limited to 'resources/libraries/robot/shared') 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} -- cgit 1.2.3-korg