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 |
Jerry Flood | 0c3270c | 2018-11-01 12:46:55 -0400 | [diff] [blame] | 10 | ${OOF_CMSO_HEALTH_CHECK_PATH} /cmso/v1/health?checkInterfaces=false |
Eric Debeau | 9045a1e | 2018-04-24 17:22:41 +0000 | [diff] [blame] | 11 | |
Gary Wu | 251aa68 | 2018-07-30 15:22:20 -0700 | [diff] [blame] | 12 | ${OOF_HOMING_ENDPOINT} ${GLOBAL_OOF_SERVER_PROTOCOL}://${GLOBAL_INJECTED_OOF_HOMING_IP_ADDR}:${GLOBAL_OOF_HOMING_SERVER_PORT} |
| 13 | ${OOF_SNIRO_ENDPOINT} ${GLOBAL_OOF_SERVER_PROTOCOL}://${GLOBAL_INJECTED_OOF_SNIRO_IP_ADDR}:${GLOBAL_OOF_SNIRO_SERVER_PORT} |
Jerry Flood | 0c3270c | 2018-11-01 12:46:55 -0400 | [diff] [blame] | 14 | ${OOF_CMSO_ENDPOINT} ${GLOBAL_OOF_CMSO_PROTOCOL}://${GLOBAL_INJECTED_OOF_CMSO_IP_ADDR}:${GLOBAL_OOF_CMSO_SERVER_PORT} |
Eric Debeau | 9045a1e | 2018-04-24 17:22:41 +0000 | [diff] [blame] | 15 | |
| 16 | *** Keywords *** |
Eric Debeau | ca1b9c8 | 2018-04-24 20:41:02 +0000 | [diff] [blame] | 17 | Run OOF-Homing Health Check |
| 18 | [Documentation] Runs OOF-Homing Health check |
| 19 | ${resp}= Run OOF-Homing Get Request ${OOF_HOMING_HEALTH_CHECK_PATH} |
Eric Debeau | 9045a1e | 2018-04-24 17:22:41 +0000 | [diff] [blame] | 20 | Should Be Equal As Integers ${resp.status_code} 200 |
| 21 | |
Eric Debeau | ca1b9c8 | 2018-04-24 20:41:02 +0000 | [diff] [blame] | 22 | Run OOF-Homing Get Request |
| 23 | [Documentation] Runs OOF-Homing Get request |
Eric Debeau | 9045a1e | 2018-04-24 17:22:41 +0000 | [diff] [blame] | 24 | [Arguments] ${data_path} |
Eric Debeau | ca1b9c8 | 2018-04-24 20:41:02 +0000 | [diff] [blame] | 25 | ${session}= Create Session session ${OOF_HOMING_ENDPOINT} |
Eric Debeau | 9045a1e | 2018-04-24 17:22:41 +0000 | [diff] [blame] | 26 | ${resp}= Get Request session ${data_path} |
| 27 | Should Be Equal As Integers ${resp.status_code} 200 |
Eric Debeau | ca1b9c8 | 2018-04-24 20:41:02 +0000 | [diff] [blame] | 28 | Log Received response from OOF-Homing ${resp.text} |
| 29 | [Return] ${resp} |
| 30 | |
| 31 | Run OOF-SNIRO Health Check |
| 32 | [Documentation] Runs OOF-SNIRO Health check |
| 33 | ${resp}= Run OOF-SNIRO Get Request ${OOF_SNIRO_HEALTH_CHECK_PATH} |
| 34 | Should Be Equal As Integers ${resp.status_code} 200 |
| 35 | |
| 36 | Run OOF-SNIRO Get Request |
| 37 | [Documentation] Runs OOF-SNIRO Get request |
| 38 | [Arguments] ${data_path} |
| 39 | ${session}= Create Session session ${OOF_SNIRO_ENDPOINT} |
| 40 | ${resp}= Get Request session ${data_path} |
| 41 | Should Be Equal As Integers ${resp.status_code} 200 |
| 42 | Log Received response from OOF-SNIRO ${resp.text} |
Eric Debeau | 9045a1e | 2018-04-24 17:22:41 +0000 | [diff] [blame] | 43 | [Return] ${resp} |
Jerry Flood | 0c3270c | 2018-11-01 12:46:55 -0400 | [diff] [blame] | 44 | |
| 45 | |
| 46 | Run OOF-CMSO Health Check |
| 47 | [Documentation] Runs OOF-CMSO Health check |
| 48 | ${resp}= Run OOF-CMSO Get Request ${OOF_CMSO_HEALTH_CHECK_PATH} |
| 49 | Should Be Equal As Integers ${resp.status_code} 200 |
| 50 | |
| 51 | Run OOF-CMSO Get Request |
| 52 | [Documentation] Runs OOF-CMSO Get request |
| 53 | [Arguments] ${data_path} |
| 54 | ${auth}= Create List ${GLOBAL_OOF_CMSO_USERNAME} ${GLOBAL_OOF_CMSO_PASSWORD} |
| 55 | ${session}= Create Session session ${OOF_CMSO_ENDPOINT} auth=${auth} |
| 56 | ${resp}= Get Request session ${data_path} |
| 57 | Should Be Equal As Integers ${resp.status_code} 200 |
| 58 | Log Received response from OOF-CMSO ${resp.text} |
| 59 | [Return] ${resp} |