blob: 02b8177676db03fed8abf4fb82d248ea1a89d839 [file] [log] [blame]
Eric Debeau9045a1e2018-04-24 17:22:41 +00001*** Settings ***
Eric Debeauca1b9c82018-04-24 20:41:02 +00002Documentation The main interface for interacting with OOF: SNIRO and Homing Service
Eric Debeau9045a1e2018-04-24 17:22:41 +00003Library RequestsLibrary
4
5Resource global_properties.robot
6
7*** Variables ***
Eric Debeauca1b9c82018-04-24 20:41:02 +00008${OOF_HOMING_HEALTH_CHECK_PATH} /v1/plans/healthcheck
9${OOF_SNIRO_HEALTH_CHECK_PATH} /api/oof/v1/healthcheck
Jerry Flood0c3270c2018-11-01 12:46:55 -040010${OOF_CMSO_HEALTH_CHECK_PATH} /cmso/v1/health?checkInterfaces=false
Eric Debeau9045a1e2018-04-24 17:22:41 +000011
Gary Wu251aa682018-07-30 15:22:20 -070012${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 Flood0c3270c2018-11-01 12:46:55 -040014${OOF_CMSO_ENDPOINT} ${GLOBAL_OOF_CMSO_PROTOCOL}://${GLOBAL_INJECTED_OOF_CMSO_IP_ADDR}:${GLOBAL_OOF_CMSO_SERVER_PORT}
Eric Debeau9045a1e2018-04-24 17:22:41 +000015
16*** Keywords ***
Eric Debeauca1b9c82018-04-24 20:41:02 +000017Run OOF-Homing Health Check
18 [Documentation] Runs OOF-Homing Health check
19 ${resp}= Run OOF-Homing Get Request ${OOF_HOMING_HEALTH_CHECK_PATH}
Eric Debeau9045a1e2018-04-24 17:22:41 +000020 Should Be Equal As Integers ${resp.status_code} 200
21
Eric Debeauca1b9c82018-04-24 20:41:02 +000022Run OOF-Homing Get Request
23 [Documentation] Runs OOF-Homing Get request
Eric Debeau9045a1e2018-04-24 17:22:41 +000024 [Arguments] ${data_path}
Eric Debeauca1b9c82018-04-24 20:41:02 +000025 ${session}= Create Session session ${OOF_HOMING_ENDPOINT}
Eric Debeau9045a1e2018-04-24 17:22:41 +000026 ${resp}= Get Request session ${data_path}
27 Should Be Equal As Integers ${resp.status_code} 200
Eric Debeauca1b9c82018-04-24 20:41:02 +000028 Log Received response from OOF-Homing ${resp.text}
29 [Return] ${resp}
30
31Run 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
36Run 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 Debeau9045a1e2018-04-24 17:22:41 +000043 [Return] ${resp}
Jerry Flood0c3270c2018-11-01 12:46:55 -040044
45
46Run 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
51Run 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}