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 |
mrichomme | 3256fa2 | 2020-03-09 11:23:35 +0100 | [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 |
mrichomme | 3256fa2 | 2020-03-09 11:23:35 +0100 | [diff] [blame] | 14 | ${resp}= Run AAF Get Request ${AAF_HEALTH_CHECK_PATH} |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 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 |
mrichomme | 3256fa2 | 2020-03-09 11:23:35 +0100 | [diff] [blame] | 17 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 18 | Run AAF Get Request |
| 19 | [Documentation] Runs AAF Get request |
| 20 | [Arguments] ${data_path} |
DR695H | c618427 | 2019-07-26 15:50:23 -0400 | [diff] [blame] | 21 | ${session}= Create Session aaf ${GLOBAL_AAF_SERVER} auth=${GLOBAL_AAF_AUTHENTICATION} |
DR695H | 18872bc | 2019-06-13 16:16:52 -0400 | [diff] [blame] | 22 | ${uuid}= Generate UUID4 |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 23 | ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} |
| 24 | ${resp}= Get Request aaf ${data_path} headers=${headers} |
| 25 | Log Received response from aaf ${resp.text} |
Brian Freeman | a966f03 | 2018-04-30 14:01:14 -0500 | [diff] [blame] | 26 | [Return] ${resp} |