DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation The main interface for interacting with AAF. It handles low level stuff like managing the http request library and AAF required fields |
| 3 | Library RequestsClientCert |
| 4 | Library RequestsLibrary |
| 5 | Library UUID |
| 6 | |
| 7 | Resource global_properties.robot |
| 8 | |
| 9 | *** Variables *** |
Brian Freeman | a966f03 | 2018-04-30 14:01:14 -0500 | [diff] [blame] | 10 | ${AAF_HEALTH_CHECK_PATH} /authz/perms/user/${GLOBAL_AAF_USERNAME} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 11 | |
| 12 | *** Keywords *** |
| 13 | Run AAF Health Check |
| 14 | [Documentation] Runs AAF Health check |
| 15 | ${resp}= Run AAF Get Request ${AAF_HEALTH_CHECK_PATH} |
| 16 | Should Be Equal As Strings ${resp.status_code} 200 |
Brian Freeman | a966f03 | 2018-04-30 14:01:14 -0500 | [diff] [blame] | 17 | #Should Contain ${resp.json()} access |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 18 | |
| 19 | Run AAF Get Request |
| 20 | [Documentation] Runs AAF Get request |
| 21 | [Arguments] ${data_path} |
| 22 | ${auth}= Create List ${GLOBAL_AAF_USERNAME} ${GLOBAL_AAF_PASSWORD} |
| 23 | ${session}= Create Session aaf ${GLOBAL_AAF_SERVER} auth=${auth} |
Brian Freeman | a966f03 | 2018-04-30 14:01:14 -0500 | [diff] [blame] | 24 | #${session_client}= Add Client Cert ${session} cert |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 25 | ${uuid}= Generate UUID |
| 26 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} |
| 27 | ${resp}= Get Request aaf ${data_path} headers=${headers} |
| 28 | Log Received response from aaf ${resp.text} |
Brian Freeman | a966f03 | 2018-04-30 14:01:14 -0500 | [diff] [blame] | 29 | [Return] ${resp} |