DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation The main interface for interacting with DCAE. It handles low level stuff like managing the http request library and DCAE required fields |
| 3 | Library RequestsLibrary |
Jerry Flood | 5db693b | 2017-05-24 08:52:39 -0400 | [diff] [blame] | 4 | Library UUID |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 5 | Library OperatingSystem |
| 6 | Library Collections |
| 7 | Resource global_properties.robot |
| 8 | |
| 9 | *** Variables *** |
Jerry Flood | bfc7fcc | 2017-10-27 12:01:36 -0400 | [diff] [blame] | 10 | ${DCAE_HEALTH_CHECK_PATH} /healthcheck |
DR695H | 5a92334 | 2018-04-16 14:43:06 -0400 | [diff] [blame] | 11 | ${DCAE_HEALTH_ENDPOINT} ${GLOBAL_DCAE_SERVER_PROTOCOL}://${GLOBAL_INJECTED_DCAE_IP_ADDR}:${GLOBAL_DCAE_HEALTH_SERVER_PORT} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 12 | |
| 13 | *** Keywords *** |
| 14 | Run DCAE Health Check |
| 15 | [Documentation] Runs a DCAE health check |
| 16 | ${auth}= Create List ${GLOBAL_DCAE_USERNAME} ${GLOBAL_DCAE_PASSWORD} |
DR695H | 5a92334 | 2018-04-16 14:43:06 -0400 | [diff] [blame] | 17 | Log Creating session ${DCAE_HEALTH_ENDPOINT} |
| 18 | ${session}= Create Session dcae ${DCAE_HEALTH_ENDPOINT} auth=${auth} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 19 | ${uuid}= Generate UUID |
Jerry Flood | 171c865 | 2017-05-23 13:12:43 -0400 | [diff] [blame] | 20 | ${headers}= Create Dictionary X-ECOMP-Client-Version=ONAP-R2 action=getTable Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} |
Jerry Flood | bfc7fcc | 2017-10-27 12:01:36 -0400 | [diff] [blame] | 21 | ${resp}= Get Request dcae ${DCAE_HEALTH_CHECK_PATH} headers=${headers} |
Brian Freeman | 189b047 | 2018-07-16 12:16:44 -0500 | [diff] [blame] | 22 | Log Received response code from dcae ${resp} |
| 23 | Log Received content from dcae ${resp.content} |
| 24 | Should Be Equal As Strings ${resp.status_code} 200 |