DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation The main interface for interacting with Portal. It handles low level stuff like managing the http request library and Portal required fields |
| 3 | Library RequestsClientCert |
| 4 | Library RequestsLibrary |
| 5 | Library UUID |
| 6 | |
| 7 | Resource global_properties.robot |
| 8 | |
| 9 | *** Variables *** |
Eric Debeau | 85b749b | 2017-10-21 15:22:02 +0000 | [diff] [blame^] | 10 | ${PORTAL_HEALTH_CHECK_PATH} /ONAPPORTAL/portalApi/healthCheck |
DR695H | bf5a3a3 | 2017-06-30 13:09:57 -0400 | [diff] [blame] | 11 | ${PORTAL_ENDPOINT} ${GLOBAL_PORTAL_SERVER_PROTOCOL}://${GLOBAL_INJECTED_PORTAL_IP_ADDR}:${GLOBAL_PORTAL_SERVER_PORT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 12 | |
| 13 | *** Keywords *** |
| 14 | Run Portal Health Check |
| 15 | [Documentation] Runs Portal Health check |
| 16 | ${resp}= Run Portal Get Request ${PORTAL_HEALTH_CHECK_PATH} |
| 17 | Should Be Equal As Strings ${resp.status_code} 200 |
| 18 | Should Be Equal As Strings ${resp.json()['statusCode']} 200 |
| 19 | |
| 20 | Run Portal Get Request |
| 21 | [Documentation] Runs Portal Get request |
| 22 | [Arguments] ${data_path} |
DR695H | bf5a3a3 | 2017-06-30 13:09:57 -0400 | [diff] [blame] | 23 | ${session}= Create Session portal ${PORTAL_ENDPOINT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 24 | ${uuid}= Generate UUID |
| 25 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} |
| 26 | ${resp}= Get Request portal ${data_path} headers=${headers} |
| 27 | Log Received response from portal ${resp.text} |
| 28 | [Return] ${resp} |
| 29 | |