X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fhoneycomb%2Fhoneycomb.robot;h=7813ee26bf41deac6f7a23b00954987717d80b9a;hp=741807877dd3eb39788f6ef5fb0f18ec10a716eb;hb=a114591eac9f52502048db886da2fb228c62254d;hpb=26f067d4fb5a37eb4fe2eaf25b5113599cee1b90 diff --git a/resources/libraries/robot/honeycomb/honeycomb.robot b/resources/libraries/robot/honeycomb/honeycomb.robot index 741807877d..7813ee26bf 100644 --- a/resources/libraries/robot/honeycomb/honeycomb.robot +++ b/resources/libraries/robot/honeycomb/honeycomb.robot @@ -12,13 +12,13 @@ # limitations under the License. *** Settings *** -| Library | resources/libraries/python/HoneycombSetup.py -| Library | resources/libraries/python/HoneycombUtil.py -| Library | resources/libraries/python/HTTPRequest.py +| Library | resources/libraries/python/honeycomb/HoneycombSetup.py +| Library | resources/libraries/python/honeycomb/HoneycombUtil.py +| Library | resources/libraries/python/honeycomb/HcPersistence.py *** Keywords *** | Setup Honeycomb service on DUTs -| | [Documentation] | *Setup environment for honeycomb testing* +| | [Documentation] | *Setup environment for honeycomb testing.* | | ... | | ... | _Setup steps:_ | | ... | - 1. Login to each honeycomb node using ssh @@ -28,18 +28,20 @@ | | ... | connection refused -> 404 -> 401 -> 503 or 500 -> 200 (pass) | | ... | - 4. Configure honeycomb nodes using HTTP PUT request | | ... +| | ... | _Arguments:_ +| | ... | - duts - list of nodes to setup Honeycomb on +| | ... | | ... | _Used global constants and variables:_ | | ... | - RESOURCES_TPL_HC - path to honeycomb templates directory | | ... | - HTTPCodes - HTTP protocol status codes -| | ... | - ${nodes} - dictionary of all nodes in topology.YAML file | | ... | | [Arguments] | @{duts} | | Start honeycomb on DUTs | @{duts} -| | Wait until keyword succeeds | 4min | 20sec +| | Wait until keyword succeeds | 4min | 16sec | | ... | Check honeycomb startup state | @{duts} | Stop honeycomb service on DUTs -| | [Documentation] | *Cleanup environment after honeycomb testing* +| | [Documentation] | *Cleanup environment after honeycomb testing.* | | ... | | ... | _Teardown steps:_ | | ... | - 1. Login to each honeycomb node using ssh @@ -48,12 +50,84 @@ | | ... | Expected sequence of HTTP replies: | | ... | 200 -> 404 -> connection refused (pass) | | ... +| | ... | _Arguments:_ +| | ... | - duts - list of nodes to stop Honeycomb on +| | ... | | ... | _Used global constants and variables:_ | | ... | - RESOURCES_TPL_HC - path to honeycomb templates directory | | ... | - HTTPCodes - HTTP protocol status codes -| | ... | - ${nodes} - dictionary of all nodes in topology.YAML file | | ... | | [Arguments] | @{duts} | | Stop honeycomb on DUTs | @{duts} -| | Wait until keyword succeeds | 2m | 10s +| | Wait until keyword succeeds | 60sec | 16sec | | ... | Check honeycomb shutdown state | @{duts} + +| Clear persisted Honeycomb configuration +| | [Documentation] | *Delete saved configuration.* +| | ... +| | ... | *Arguments:* +| | ... | - duts - one or more nodes to clear persistence on. Type: dictionary +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Clear persisted Honeycomb configuration \| ${nodes['DUT1']} \| +| | [Arguments] | @{duts} +| | Clear persisted Honeycomb config | @{duts} + +| Restart Honeycomb and VPP and clear persisted configuration +| | [Documentation] | Restarts Honeycomb and VPP with default configuration. +| | ... +| | ... | *Arguments:* +| | ... | - node - information about a DUT node. Type: dictionary +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Restart Honeycomb and VPP and clear persisted configuration \ +| | ... | \| ${nodes['DUT1']} \| +| | [Arguments] | ${node} +| | Stop Honeycomb service on DUTs | ${node} +| | Clear persisted Honeycomb configuration | ${node} +| | Log | Persistence files cleared. | console=True +| | Setup DUT | ${node} +| | Setup Honeycomb service on DUTs | ${node} + +| Restart Honeycomb and VPP +| | [Documentation] | Restarts Honeycomb service and wait until it starts up. +| | ... +| | ... | *Arguments:* +| | ... | - node - information about a DUT node. Type: dictionary +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Restart Honeycomb and VPP \| ${nodes['DUT1']} \| +| | [Arguments] | ${node} +| | Restart Honeycomb and VPP on DUTs | ${node} +| | Wait until keyword succeeds | 4min | 16sec +| | ... | Check honeycomb startup state | ${node} + +| Archive Honeycomb log file +| | [Documentation] | Copy honeycomb.log file from Honeycomb node\ +| | ... | to test executor. +| | ... | *Arguments:* +| | ... | - node - information about a DUT node. Type: dictionary +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Archive Honeycomb log file \| ${nudes['DUT1']} \| +| | [Arguments] | ${node} +| | Archive Honeycomb log | ${node} + +| Find ODL client on node +| | [Arguments] | ${node} +| | ${odl_present}= | Find ODL Client | ${node} +| | Return from keyword | ${odl_present} + +| Start ODL client on node +| | [Arguments] | ${node} +| | Start ODL client | ${node} +| | Wait until keyword succeeds | 4min | 16sec +| | ... | Mount Honeycomb on ODL | ${node} +| | Wait until keyword succeeds | 2min | 16sec +| | ... | Check ODL startup state | ${node} +| | Wait until keyword succeeds | 2min | 16sec +| | ... | Check honeycomb startup state | ${node}