aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2019-08-19 11:49:07 +0000
committerPeter Mikus <pmikus@cisco.com>2019-08-20 07:59:37 +0000
commit329e0acee1cf31c6524883e15560993af76f0fad (patch)
treef730742ec11cbebe71e96b1d03e8bbdeddca9cea /resources/libraries/robot
parentbaa47eee42b9b1f5fd4d19f0d4549f3baeac8354 (diff)
Align NF_denisty tests
+ Apply layer approach for interfaces Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: I6c1898b9833f9f42b8912f1b521e30093360d7ea
Diffstat (limited to 'resources/libraries/robot')
-rw-r--r--resources/libraries/robot/l2/l2_bridge_domain.robot41
1 files changed, 27 insertions, 14 deletions
diff --git a/resources/libraries/robot/l2/l2_bridge_domain.robot b/resources/libraries/robot/l2/l2_bridge_domain.robot
index a40f9c9c59..e15f8b4338 100644
--- a/resources/libraries/robot/l2/l2_bridge_domain.robot
+++ b/resources/libraries/robot/l2/l2_bridge_domain.robot
@@ -591,22 +591,28 @@
| | ${rxq}= | Run Keyword If | ${auto_scale} == ${True}
| | ... | Set Variable | ${rxq_count_int}
| | ... | ELSE | Set Variable | ${1}
-| | ${bd_id2}= | Evaluate | ${nf_nodes}+1
-| | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if1} | ${1}
-| | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if2}
+| | ${bd_id1}= | Evaluate | ${nf_nodes} * (${nf_chain} - 1) + ${nf_chain}
+| | ${bd_id2}= | Evaluate | ${nf_nodes} * ${nf_chain} + ${nf_chain}
+| | ${dut_str}= | Convert To Lowercase | ${dut}
+| | Add interface to bridge domain
+| | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${nf_chain}_1}
+| | ... | ${bd_id1}
+| | Add interface to bridge domain
+| | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${nf_chain}_2}
| | ... | ${bd_id2}
| | :FOR | ${nf_node} | IN RANGE | 1 | ${nf_nodes}+1
| | | ${nf_id}= | Evaluate | (${nf_chain} - ${1}) * ${nf_nodes} + ${nf_node}
| | | ${sock1}= | Set Variable | memif-${dut}_CNF
| | | ${sock2}= | Set Variable | memif-${dut}_CNF
+| | | ${bd_id1}= | Evaluate | ${nf_id} + (${nf_chain} - 1)
+| | | ${bd_id2}= | Evaluate | ${bd_id1} + 1
| | | Set up memif interfaces on DUT node | ${nodes['${dut}']}
| | | ... | ${sock1} | ${sock2} | ${nf_id} | ${dut}-memif-${nf_id}-if1
| | | ... | ${dut}-memif-${nf_id}-if2 | ${rxq} | ${rxq}
-| | | ${bd_id2}= | Evaluate | ${nf_node}+1
-| | | Add interface to bridge domain | ${nodes['${dut}']}
-| | | ... | ${${dut}-memif-${nf_id}-if1} | ${nf_node}
-| | | Add interface to bridge domain | ${nodes['${dut}']}
-| | | ... | ${${dut}-memif-${nf_id}-if2} | ${bd_id2}
+| | | Add interface to bridge domain
+| | | ... | ${nodes['${dut}']} | ${${dut}-memif-${nf_id}-if1} | ${bd_id1}
+| | | Add interface to bridge domain
+| | | ... | ${nodes['${dut}']} | ${${dut}-memif-${nf_id}-if2} | ${bd_id2}
| Initialize L2 Bridge Domain with memif pairs
| | [Documentation]
@@ -680,9 +686,16 @@
| | ${rxq}= | Run Keyword If | ${auto_scale} == ${True}
| | ... | Set Variable | ${rxq_count_int}
| | ... | ELSE | Set Variable | ${1}
+| | ${bd_id1}= | Evaluate | ${nf_nodes} * (${nf_chain} - 1) + ${nf_chain}
+| | ${bd_id2}= | Evaluate | ${nf_nodes} * ${nf_chain} + ${nf_chain}
| | :FOR | ${dut} | IN | @{duts}
-| | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if1} | ${1}
-| | | Add interface to bridge domain | ${nodes['${dut}']} | ${${dut}_if2} | ${2}
+| | | ${dut_str}= | Convert To Lowercase | ${dut}
+| | | Add interface to bridge domain
+| | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${nf_chain}_1}
+| | | ... | ${bd_id1}
+| | | Add interface to bridge domain
+| | | ... | ${nodes['${dut}']} | ${${dut_str}_${prev_layer}_${nf_chain}_2}
+| | | ... | ${bd_id2}
| | | ${nf_id_frst}= | Evaluate | (${nf_chain}-${1}) * ${nf_nodes} + ${1}
| | | ${nf_id_last}= | Evaluate | (${nf_chain}-${1}) * ${nf_nodes} + ${nf_nodes}
| | | ${sid_frst}= | Evaluate | ${nf_id_frst} * ${2} - ${1}
@@ -695,10 +708,10 @@
| | | ... | memif-${dut}_CNF | mid=${nf_id_last} | sid=${sid_last}
| | | ... | memif_if=${dut}-memif-${nf_id_last}-if2
| | | ... | rxq=${rxq} | txq=${rxq}
-| | | Add interface to bridge domain | ${nodes['${dut}']}
-| | | ... | ${${dut}-memif-${nf_id_frst}-if1} | ${1}
-| | | Add interface to bridge domain | ${nodes['${dut}']}
-| | | ... | ${${dut}-memif-${nf_id_last}-if2} | ${2}
+| | | Add interface to bridge domain
+| | | ... | ${nodes['${dut}']} | ${${dut}-memif-${nf_id_frst}-if1} | ${bd_id1}
+| | | Add interface to bridge domain
+| | | ... | ${nodes['${dut}']} | ${${dut}-memif-${nf_id_last}-if2} | ${bd_id2}
| Initialize L2 Bridge Domain for multiple pipelines with memif pairs
| | [Documentation]