aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/robot/shared/default.robot
diff options
context:
space:
mode:
authorLudovit Mikula <ludovit.mikula@pantheon.tech>2019-07-17 14:36:21 +0000
committerPeter Mikus <pmikus@cisco.com>2019-12-11 08:54:36 +0000
commit3d5a75be5a88931690898e0fe52e4f48bc67c5ed (patch)
tree85b96f1e8e41d20dfd2a96f43689997dc632f78a /resources/libraries/robot/shared/default.robot
parentf99c79a4035787aff0db70498d022095caa44043 (diff)
Introduce VPP-IPsec container tests.
Change-Id: Ie64d662e81879bd52785e0188450d998bf056bda Signed-off-by: Ludovit Mikula <ludovit.mikula@pantheon.tech>
Diffstat (limited to 'resources/libraries/robot/shared/default.robot')
-rw-r--r--resources/libraries/robot/shared/default.robot40
1 files changed, 37 insertions, 3 deletions
diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot
index ab8a409219..3b8f2804c1 100644
--- a/resources/libraries/robot/shared/default.robot
+++ b/resources/libraries/robot/shared/default.robot
@@ -119,7 +119,7 @@
| | FOR | ${dut} | IN | @{duts}
| | | Import Library | resources.libraries.python.VppConfigGenerator
| | | ... | WITH NAME | ${dut}
-| | | Run keyword | ${dut}.Set Node | ${nodes['${dut}']}
+| | | Run keyword | ${dut}.Set Node | ${nodes['${dut}']} | node_key=${dut}
| | | Run keyword | ${dut}.Add Unix Log
| | | Run keyword | ${dut}.Add Unix CLI Listen
| | | Run keyword | ${dut}.Add Unix Nodaemon
@@ -315,14 +315,30 @@
| |
| | FOR | ${dut} | IN | @{duts}
| | | Run keyword | ${dut}.Apply Config
-| | | Add New Socket | ${nodes['${dut}']} | PAPI | ${dut} | ${SOCKSVR_PATH}
-| | | Add New Socket | ${nodes['${dut}']} | STATS | ${dut} | ${SOCKSTAT_PATH}
| | END
| | Save VPP PIDs
| | Enable Coredump Limit VPP on All DUTs | ${nodes}
| | Update All Interface Data On All Nodes | ${nodes} | skip_tg=${True}
| | Run keyword If | ${with_trace} | VPP Enable Traces On All Duts | ${nodes}
+| Apply startup configuration on VPP DUT
+| | [Documentation] | Write VPP startup configuration and restart VPP DUT.
+| |
+| | ... | *Arguments:*
+| | ... | - dut - DUT on which to apply the configuration. Type: string
+| | ... | - with_trace - Enable packet trace after VPP restart Type: boolean
+| |
+| | [Arguments] | ${dut} | ${with_trace}=${False}
+| |
+| | Run keyword | ${dut}.Apply Config
+| | Save VPP PIDs on DUT | ${dut}
+| | Enable Coredump Limit VPP on DUT | ${nodes['${dut}']}
+| | ${dutnode}= | Copy Dictionary | ${nodes}
+| | Keep In Dictionary | ${dutnode} | ${dut}
+| | Update All Interface Data On All Nodes | ${dutnode} | skip_tg=${True}
+| | Run keyword If | ${with_trace} | VPP Enable Traces On Dut
+| | ... | ${nodes['${dut}']}
+
| Save VPP PIDs
| | [Documentation] | Get PIDs of VPP processes from all DUTs in topology and\
| | ... | set it as a test variable. The PIDs are stored as dictionary items\
@@ -337,6 +353,24 @@
| | END
| | Set Test Variable | ${setup_vpp_pids}
+| Save VPP PIDs on DUT
+| | [Documentation] | Get PID of VPP processes from DUT and\
+| | ... | set it as a test variable. The PID is stored as dictionary item\
+| | ... | where the key is the host and the value is the PID.
+| |
+| | [Arguments] | ${dut}
+| |
+| | ${vpp_pids}= | Get VPP PID | ${nodes['${dut}']}
+| | Run Keyword If | ${vpp_pids} is None | FAIL
+| | ... | No VPP PID found on node ${nodes['${dut}']['host']
+| | ${status} | ${message}= | Run Keyword And Ignore Error
+| | ... | Variable Should Exist | ${setup_vpp_pids}
+| | ${setup_vpp_pids}= | Run Keyword If | '${status}' == 'FAIL'
+| | ... | Create Dictionary | ${nodes['${dut}']['host']}=${vpp_pids}
+| | ... | ELSE | Set To Dictionary | ${setup_vpp_pids}
+| | ... | ${nodes['${dut}']['host']}=${vpp_pids}
+| | Set Test Variable | ${setup_vpp_pids}
+
| Verify VPP PID in Teardown
| | [Documentation] | Check if the VPP PIDs on all DUTs are the same at the end\
| | ... | of test as they were at the begining. If they are not, only a message\