Eric Debeau | 9045a1e | 2018-04-24 17:22:41 +0000 | [diff] [blame] | 1 | *** Settings *** |
Eric Debeau | ca1b9c8 | 2018-04-24 20:41:02 +0000 | [diff] [blame] | 2 | Documentation The main interface for interacting with OOF: SNIRO and Homing Service |
Eric Debeau | 9045a1e | 2018-04-24 17:22:41 +0000 | [diff] [blame] | 3 | Library RequestsLibrary |
| 4 | |
| 5 | Resource global_properties.robot |
| 6 | |
| 7 | *** Variables *** |
Eric Debeau | ca1b9c8 | 2018-04-24 20:41:02 +0000 | [diff] [blame] | 8 | ${OOF_HOMING_HEALTH_CHECK_PATH} /v1/plans/healthcheck |
| 9 | ${OOF_SNIRO_HEALTH_CHECK_PATH} /api/oof/v1/healthcheck |
Eric Debeau | 9045a1e | 2018-04-24 17:22:41 +0000 | [diff] [blame] | 10 | |
Gary Wu | 251aa68 | 2018-07-30 15:22:20 -0700 | [diff] [blame] | 11 | ${OOF_HOMING_ENDPOINT} ${GLOBAL_OOF_SERVER_PROTOCOL}://${GLOBAL_INJECTED_OOF_HOMING_IP_ADDR}:${GLOBAL_OOF_HOMING_SERVER_PORT} |
| 12 | ${OOF_SNIRO_ENDPOINT} ${GLOBAL_OOF_SERVER_PROTOCOL}://${GLOBAL_INJECTED_OOF_SNIRO_IP_ADDR}:${GLOBAL_OOF_SNIRO_SERVER_PORT} |
Eric Debeau | 9045a1e | 2018-04-24 17:22:41 +0000 | [diff] [blame] | 13 | |
| 14 | *** Keywords *** |
Eric Debeau | ca1b9c8 | 2018-04-24 20:41:02 +0000 | [diff] [blame] | 15 | Run OOF-Homing Health Check |
| 16 | [Documentation] Runs OOF-Homing Health check |
| 17 | ${resp}= Run OOF-Homing Get Request ${OOF_HOMING_HEALTH_CHECK_PATH} |
Eric Debeau | 9045a1e | 2018-04-24 17:22:41 +0000 | [diff] [blame] | 18 | Should Be Equal As Integers ${resp.status_code} 200 |
| 19 | |
Eric Debeau | ca1b9c8 | 2018-04-24 20:41:02 +0000 | [diff] [blame] | 20 | Run OOF-Homing Get Request |
| 21 | [Documentation] Runs OOF-Homing Get request |
Eric Debeau | 9045a1e | 2018-04-24 17:22:41 +0000 | [diff] [blame] | 22 | [Arguments] ${data_path} |
Eric Debeau | ca1b9c8 | 2018-04-24 20:41:02 +0000 | [diff] [blame] | 23 | ${session}= Create Session session ${OOF_HOMING_ENDPOINT} |
Eric Debeau | 9045a1e | 2018-04-24 17:22:41 +0000 | [diff] [blame] | 24 | ${resp}= Get Request session ${data_path} |
| 25 | Should Be Equal As Integers ${resp.status_code} 200 |
Eric Debeau | ca1b9c8 | 2018-04-24 20:41:02 +0000 | [diff] [blame] | 26 | Log Received response from OOF-Homing ${resp.text} |
| 27 | [Return] ${resp} |
| 28 | |
| 29 | Run OOF-SNIRO Health Check |
| 30 | [Documentation] Runs OOF-SNIRO Health check |
| 31 | ${resp}= Run OOF-SNIRO Get Request ${OOF_SNIRO_HEALTH_CHECK_PATH} |
| 32 | Should Be Equal As Integers ${resp.status_code} 200 |
| 33 | |
| 34 | Run OOF-SNIRO Get Request |
| 35 | [Documentation] Runs OOF-SNIRO Get request |
| 36 | [Arguments] ${data_path} |
| 37 | ${session}= Create Session session ${OOF_SNIRO_ENDPOINT} |
| 38 | ${resp}= Get Request session ${data_path} |
| 39 | Should Be Equal As Integers ${resp.status_code} 200 |
| 40 | Log Received response from OOF-SNIRO ${resp.text} |
Eric Debeau | 9045a1e | 2018-04-24 17:22:41 +0000 | [diff] [blame] | 41 | [Return] ${resp} |