Setup and check honeycomb on all DUTs
[csit.git] / resources / libraries / robot / honeycomb.robot
1 # Copyright (c) 2016 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15 | Library | resources/libraries/python/HoneycombSetup.py
16 | Library | resources/libraries/python/HoneycombUtil.py
17 | Library | resources/libraries/python/HTTPRequest.py
18
19 *** Keywords ***
20 | Setup Honeycomb service
21 | | [Documentation] | *Setup environment for honeycomb testing*
22 | | ...
23 | | ... | _Setup steps:_
24 | | ... | - 1. Login to each honeycomb node using ssh
25 | | ... | - 2. Startup honeycomb service
26 | | ... | - 3. Monitor service startup using HTTP GET request loop
27 | | ... | Expected sequence of HTTP replies: connection refused -> 404 -> 401 -> 503 -> 200 (pass)
28 | | ... | - 4. Configure honeycomb nodes using HTTP PUT request
29 | | ...
30 | | ... | _Used global constants and variables:_
31 | | ... | - RESOURCES_TPL_HC - path to honeycomb templates directory
32 | | ... | - HTTPCodes - HTTP protocol status codes
33 | | ... | - ${nodes} - dictionary of all nodes in topology.YAML file
34 | | ...
35 | | Start Honeycomb on all DUTs | ${nodes}
36 | | Wait until keyword succeeds | 3min | 10sec | Check honeycomb startup state | ${nodes}
37 | | &{Header}= | Create dictionary | Content-Type=application/xml
38 | | Add VPP to honeycomb network topology | ${nodes} | ${header}
39
40 | Stop honeycomb service
41 | | [Documentation] | *Cleanup environment after honeycomb testing*
42 | | ...
43 | | ... | _Teardown steps:_
44 | | ... | - 1. Login to each honeycomb node using ssh
45 | | ... | - 2. Stop honeycomb service
46 | | ... | - 3. Monitor service shutdown using HTTP GET request loop
47 | | ... | Expected sequence of HTTP replies: 200 -> 404 -> connection refused (pass)
48 | | ...
49 | | ... | _Used global constants and variables:_
50 | | ... | - RESOURCES_TPL_HC - path to honeycomb templates directory
51 | | ... | - HTTPCodes - HTTP protocol status codes
52 | | ... | - ${nodes} - dictionary of all nodes in topology.YAML file
53 | | ...
54 | | Stop honeycomb on all DUTs | ${nodes}
55 | | Wait until keyword succeeds | 1m | 5s | Check honeycomb shutdown state | ${nodes}
56
57 | Honeycomb checks VPP node configuration
58 | | [Documentation] | *Check configuration of honeycomb nodes*
59 | | ...
60 | | ... | _Arguments:_
61 | | ... | - None
62 | | ...
63 | | ... | _Return value:_
64 | | ... | - None
65 | | ...
66 | | ${reply}= | Get configured topology | ${nodes}
67 | | :FOR | ${item} | IN | @{reply}
68 | | | Should match regexp | ${item} | ^DUT\\d{1,2}$