blob: b1bb004d285801eafdd3655caf0e6470406039d6 [file] [log] [blame]
DR695Hccff30b2017-02-17 18:44:24 -05001*** Settings ***
2Documentation The main interface for interacting with AAF. It handles low level stuff like managing the http request library and AAF required fields
DR695Hccff30b2017-02-17 18:44:24 -05003Library RequestsLibrary
DR695H18872bc2019-06-13 16:16:52 -04004Library ONAPLibrary.Utilities
DR695Hccff30b2017-02-17 18:44:24 -05005
6Resource global_properties.robot
7
8*** Variables ***
Brian Freemana966f032018-04-30 14:01:14 -05009${AAF_HEALTH_CHECK_PATH} /authz/perms/user/${GLOBAL_AAF_USERNAME}
DR695Hccff30b2017-02-17 18:44:24 -050010
11*** Keywords ***
12Run 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 Freemana966f032018-04-30 14:01:14 -050016 #Should Contain ${resp.json()} access
DR695Hccff30b2017-02-17 18:44:24 -050017
18Run 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}
DR695H18872bc2019-06-13 16:16:52 -040023 ${uuid}= Generate UUID4
DR695Hccff30b2017-02-17 18:44:24 -050024 ${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 Freemana966f032018-04-30 14:01:14 -050027 [Return] ${resp}