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 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 3 | Library RequestsLibrary |
DR695H | 18872bc | 2019-06-13 16:16:52 -0400 | [diff] [blame] | 4 | Library ONAPLibrary.Utilities |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 5 | |
| 6 | Resource global_properties.robot |
| 7 | |
| 8 | *** Variables *** |
Brian Freeman | a966f03 | 2018-04-30 14:01:14 -0500 | [diff] [blame] | 9 | ${AAF_HEALTH_CHECK_PATH} /authz/perms/user/${GLOBAL_AAF_USERNAME} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 10 | |
| 11 | *** Keywords *** |
| 12 | Run AAF Health Check |
| 13 | [Documentation] Runs AAF Health check |
| 14 | ${resp}= Run AAF Get Request ${AAF_HEALTH_CHECK_PATH} |
| 15 | Should Be Equal As Strings ${resp.status_code} 200 |
Brian Freeman | a966f03 | 2018-04-30 14:01:14 -0500 | [diff] [blame] | 16 | #Should Contain ${resp.json()} access |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 17 | |
| 18 | Run AAF Get Request |
| 19 | [Documentation] Runs AAF Get request |
| 20 | [Arguments] ${data_path} |
| 21 | ${auth}= Create List ${GLOBAL_AAF_USERNAME} ${GLOBAL_AAF_PASSWORD} |
| 22 | ${session}= Create Session aaf ${GLOBAL_AAF_SERVER} auth=${auth} |
DR695H | 18872bc | 2019-06-13 16:16:52 -0400 | [diff] [blame] | 23 | ${uuid}= Generate UUID4 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 24 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} |
| 25 | ${resp}= Get Request aaf ${data_path} headers=${headers} |
| 26 | Log Received response from aaf ${resp.text} |
Brian Freeman | a966f03 | 2018-04-30 14:01:14 -0500 | [diff] [blame] | 27 | [Return] ${resp} |