aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/shared/memif.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/shared/memif.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/shared/memif.robot')
-rw-r--r--resources/libraries/robot/shared/memif.robot30
1 files changed, 30 insertions, 0 deletions
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}